← 返回首页
bpo-44412: add `os.path.fileuri()` function. by barneygale · Pull Request #26708 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

bpo-44412: add os.path.fileuri() function.#26708

Closed
barneygale wants to merge 1 commit into
python:mainfrom
barneygale:bpo-44412-fileuri
Closed

bpo-44412: add os.path.fileuri() function.#26708
barneygale wants to merge 1 commit into
python:mainfrom
barneygale:bpo-44412-fileuri

Conversation

barneygale commented Jun 13, 2021
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Contributor

One of only three pieces of functionality that's available in the
object-oriented pathlib library, but not the traditional os/os.path
modules.

By moving this functionality to low-level modules, we make progress towards
being able to remove pathlib._Flavour in bpo-44136 and ultimately unlock
pathlib's OOPy potential in bpo-24132.

This commit also adjusts urllib.request.pathname2url() to use the new
implementation on Windows. On other platforms, the existing implementation
is retained due to its simplicity and its highly questionable support for
relative file URIs (like 'file:photos/foo.txt')

https://bugs.python.org/issue44412

One of only three pieces of functionality that's available in the object-oriented pathlib library, but not the traditional os/os.path modules. By moving this functionality to low-level modules, we make progress towards being able to remove `pathlib._Flavour` in bpo-44136 and ultimately unlock pathlib's OOPy potential in bpo-24132. This commit also adjusts `urllib.request.pathname2url()` to use the new implementation on Windows. On other platforms, the existing implementation is retained due to its simplicity and its highly questionable support for relative file URIs (like `'file:photos/foo.txt'`)

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

github-actions Bot added the stale Stale PR or inactive for long period of time. label Jul 14, 2021
barneygale closed this Jan 1, 2022
barneygale mannequin mentioned this pull request Jun 21, 2022
projetmbc mannequin mentioned this pull request Jun 21, 2022
barneygale mannequin mentioned this pull request Apr 10, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Footer

© 2026 GitHub, Inc.