GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add os.path.fileuri() function · Issue #88578 · python/cpython

Add os.path.fileuri() function #88578

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Add os.path.fileuri() function#88578
Copy link
Labels
3.11only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

Description

barneygale
mannequin
opened on Jun 13, 2021
Issue body actions
BPO 44412
Nosy @barneygale
PRs
  • bpo-44412: add os.path.fileuri() function. #26708
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2021-06-13.16:10:22.472>
    labels = ['type-feature', 'library', '3.11']
    title = 'Add os.path.fileuri() function'
    updated_at = <Date 2021-06-13.16:55:19.479>
    user = 'https://github.com/barneygale'

    bugs.python.org fields:

    activity = <Date 2021-06-13.16:55:19.479>
    actor = 'barneygale'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2021-06-13.16:10:22.472>
    creator = 'barneygale'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 44412
    keywords = ['patch']
    message_count = 1.0
    messages = ['395756']
    nosy_count = 1.0
    nosy_names = ['barneygale']
    pr_nums = ['26708']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue44412'
    versions = ['Python 3.11']

    Activity

    1. barneygale commented on Jun 13, 2021

      @barneygale
      barneygalemannequin
      on Jun 13, 2021
      MannequinAuthor
      More actions

      Proposal:

      • Introduce os.path.fileuri() function that produces a 'file://' URI
      • Adjust PurePosixPath.to_uri() to call posixpath.fileuri()
      • Adjust PureWindowsPath.to_uri() to call ntpath.fileuri()
      • Adjust nturl2path.pathname2url() to call ntpath.fileuri()

      Rationale:

      • pathlib is 95% a wrapper around os and os.path. It implements
        little itself except the OOP interface. as_uri() is one of only a
        tiny handful of pathlib features that have no decent antecedents.
      • the existence of these OS-specific features complicates pathlib's
        internals, necessitating the existence of OS-specific '_Flavour'
        classes that greatly complicate work on bpo-24132
      • this is a useful feature with lots of stackoverflow posts. It seems
        silly to /require/ users to use pathlib for this, as the rest of their
        codebase may work just fine using traditional path manip.

      Further discussion on python-ideas: https://discuss.python.org/t/pathlib-and-os-path-feature-parity-and-code-de-duplication/9239

      Related: bpo-44403, bpo-44136, bpo-24132

    2. barneygale
      added
      3.11only security fixesonly security fixes
      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancementA feature request or enhancement
      on Jun 13, 2021
    3. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    4. barneygale commented on Oct 30, 2024

      @barneygale
      barneygale
      on Oct 30, 2024
      ContributorAuthor
      More actions

      Withdrawing this request in favour of #125866

    5. barneygale
      closed this as not plannedon Oct 30, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.11only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions

        You are visitor 01402503 — GeezerVison does not store the pages you look up.
        Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.