René's URL Explorer Experiment


Title: bpo-44412: add `os.path.fileuri()` function. by barneygale · Pull Request #26708 · python/cpython · GitHub

Open Graph Title: bpo-44412: add `os.path.fileuri()` function. by barneygale · Pull Request #26708 · python/cpython

X Title: bpo-44412: add `os.path.fileuri()` function. by barneygale · Pull Request #26708 · python/cpython

Description: 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

Open Graph Description: 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,...

X Description: 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 modu...

Opengraph URL: https://github.com/python/cpython/pull/26708

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:1eb9f422-6ad2-5700-de0f-2cd5f082be26
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA500:22DB0A:1540B66:1E04499:69691C82
html-safe-noncebfaaf885a3d4f87136db7e1c3fbd17b0515fd3b21a82554f98be53ffbc3164c8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTAwOjIyREIwQToxNTQwQjY2OjFFMDQ0OTk6Njk2OTFDODIiLCJ2aXNpdG9yX2lkIjoiNTI0NTE3MTY3MTc2MzU5MDI3NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac06ed1cc5e4dda1beb2d7f67dd9d22fbf71834299e22a7d30bccfa9bfb4c6886c
hovercard-subject-tagpull_request:669083726
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/26708/files
twitter:imagehttps://avatars.githubusercontent.com/u/960340?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/960340?s=400&v=4
og:image:altOne 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,...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released69ac0477df0f87da03b8b06cebd187012d7a930
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/26708/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F26708%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F26708%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/26708/files
Reloadhttps://github.com/python/cpython/pull/26708/files
Reloadhttps://github.com/python/cpython/pull/26708/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/26708/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/26708/files
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
barneygalehttps://github.com/barneygale
python:mainhttps://github.com/python/cpython/tree/main
barneygale:bpo-44412-fileurihttps://github.com/barneygale/cpython/tree/bpo-44412-fileuri
Conversation 1 https://github.com/python/cpython/pull/26708
Commits 1 https://github.com/python/cpython/pull/26708/commits
Checks 0 https://github.com/python/cpython/pull/26708/checks
Files changed https://github.com/python/cpython/pull/26708/files
Please reload this pagehttps://github.com/python/cpython/pull/26708/files
bpo-44412: add os.path.fileuri() function. https://github.com/python/cpython/pull/26708/files#top
Show all changes 1 commit https://github.com/python/cpython/pull/26708/files
fbf5e14 bpo-44412: add `os.path.fileuri()` function. barneygale Jun 13, 2021 https://github.com/python/cpython/pull/26708/commits/fbf5e14b7804d3409e27d2d03cead80735a0521f
Clear filters https://github.com/python/cpython/pull/26708/files
Please reload this pagehttps://github.com/python/cpython/pull/26708/files
Please reload this pagehttps://github.com/python/cpython/pull/26708/files
os.path.rst https://github.com/python/cpython/pull/26708/files#diff-22dc079c4b2ebb7590f7963d2a7ea70133920c3f465d35b421ec9451c563d783
pathlib.rst https://github.com/python/cpython/pull/26708/files#diff-1134e36a94ecfde1df43bee5efd285de5d67426fbca086425201ecc753f9139c
ntpath.py https://github.com/python/cpython/pull/26708/files#diff-892add06b0598c5d7b07448e0ac87f5aa6b97fd0a79d77bcbc69092b70d1d065
nturl2path.py https://github.com/python/cpython/pull/26708/files#diff-dfd6b42c7038c17d5ca53114ad6db294c8144ed9083bd030677c668f2261cae3
pathlib.py https://github.com/python/cpython/pull/26708/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
posixpath.py https://github.com/python/cpython/pull/26708/files#diff-d6136c5d9ee0e94f1493c883b3ff81b005862e11fe75aaab85b760f4309e8146
test_ntpath.py https://github.com/python/cpython/pull/26708/files#diff-f32eb738dcaaaaeb2ac5bcd885fd517e11c9efc35c44912bef0c725e20c1fbea
test_posixpath.py https://github.com/python/cpython/pull/26708/files#diff-2ba0be153d12a4810bc4d509c97d4c244a9f4fd754c1b47d8d7a991238467595
test_urllib.py https://github.com/python/cpython/pull/26708/files#diff-111958b1956c05d043a3da3bcf638cff888dff68cddd71f7eeae257fc6080dcb
2021-06-13-17-35-24.bpo-44412.qFjsi6.rst https://github.com/python/cpython/pull/26708/files#diff-a522b9bf26da05562110ae53ff916ccb3dec6ff5284e738eaaf8c46f2eecc3a4
Doc/library/os.path.rsthttps://github.com/python/cpython/pull/26708/files#diff-22dc079c4b2ebb7590f7963d2a7ea70133920c3f465d35b421ec9451c563d783
View file https://github.com/barneygale/cpython/blob/fbf5e14b7804d3409e27d2d03cead80735a0521f/Doc/library/os.path.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26708/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26708/files#diff-22dc079c4b2ebb7590f7963d2a7ea70133920c3f465d35b421ec9451c563d783
https://github.com/python/cpython/pull/26708/files#diff-22dc079c4b2ebb7590f7963d2a7ea70133920c3f465d35b421ec9451c563d783
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L525
Doc/library/pathlib.rsthttps://github.com/python/cpython/pull/26708/files#diff-1134e36a94ecfde1df43bee5efd285de5d67426fbca086425201ecc753f9139c
View file https://github.com/barneygale/cpython/blob/fbf5e14b7804d3409e27d2d03cead80735a0521f/Doc/library/pathlib.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26708/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26708/files#diff-1134e36a94ecfde1df43bee5efd285de5d67426fbca086425201ecc753f9139c
https://github.com/python/cpython/pull/26708/files#diff-1134e36a94ecfde1df43bee5efd285de5d67426fbca086425201ecc753f9139c
Lib/ntpath.pyhttps://github.com/python/cpython/pull/26708/files#diff-892add06b0598c5d7b07448e0ac87f5aa6b97fd0a79d77bcbc69092b70d1d065
View file https://github.com/barneygale/cpython/blob/fbf5e14b7804d3409e27d2d03cead80735a0521f/Lib/ntpath.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26708/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26708/files#diff-892add06b0598c5d7b07448e0ac87f5aa6b97fd0a79d77bcbc69092b70d1d065
https://github.com/python/cpython/pull/26708/files#diff-892add06b0598c5d7b07448e0ac87f5aa6b97fd0a79d77bcbc69092b70d1d065
https://github.com/python/cpython/pull/26708/files#diff-892add06b0598c5d7b07448e0ac87f5aa6b97fd0a79d77bcbc69092b70d1d065
https://github.com/python/cpython/pull/26708/files#diff-892add06b0598c5d7b07448e0ac87f5aa6b97fd0a79d77bcbc69092b70d1d065
Lib/nturl2path.pyhttps://github.com/python/cpython/pull/26708/files#diff-dfd6b42c7038c17d5ca53114ad6db294c8144ed9083bd030677c668f2261cae3
View file https://github.com/barneygale/cpython/blob/fbf5e14b7804d3409e27d2d03cead80735a0521f/Lib/nturl2path.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26708/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26708/files#diff-dfd6b42c7038c17d5ca53114ad6db294c8144ed9083bd030677c668f2261cae3
https://github.com/python/cpython/pull/26708/files#diff-dfd6b42c7038c17d5ca53114ad6db294c8144ed9083bd030677c668f2261cae3
https://github.com/python/cpython/pull/26708/files#diff-dfd6b42c7038c17d5ca53114ad6db294c8144ed9083bd030677c668f2261cae3
Lib/pathlib.pyhttps://github.com/python/cpython/pull/26708/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
View file https://github.com/barneygale/cpython/blob/fbf5e14b7804d3409e27d2d03cead80735a0521f/Lib/pathlib.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26708/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26708/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
https://github.com/python/cpython/pull/26708/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
https://github.com/python/cpython/pull/26708/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
https://github.com/python/cpython/pull/26708/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
https://github.com/python/cpython/pull/26708/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
https://github.com/python/cpython/pull/26708/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
https://github.com/python/cpython/pull/26708/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
https://github.com/python/cpython/pull/26708/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
Lib/posixpath.pyhttps://github.com/python/cpython/pull/26708/files#diff-d6136c5d9ee0e94f1493c883b3ff81b005862e11fe75aaab85b760f4309e8146
View file https://github.com/barneygale/cpython/blob/fbf5e14b7804d3409e27d2d03cead80735a0521f/Lib/posixpath.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26708/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26708/files#diff-d6136c5d9ee0e94f1493c883b3ff81b005862e11fe75aaab85b760f4309e8146
https://github.com/python/cpython/pull/26708/files#diff-d6136c5d9ee0e94f1493c883b3ff81b005862e11fe75aaab85b760f4309e8146
https://github.com/python/cpython/pull/26708/files#diff-d6136c5d9ee0e94f1493c883b3ff81b005862e11fe75aaab85b760f4309e8146
https://github.com/python/cpython/pull/26708/files#diff-d6136c5d9ee0e94f1493c883b3ff81b005862e11fe75aaab85b760f4309e8146
Lib/test/test_ntpath.pyhttps://github.com/python/cpython/pull/26708/files#diff-f32eb738dcaaaaeb2ac5bcd885fd517e11c9efc35c44912bef0c725e20c1fbea
View file https://github.com/barneygale/cpython/blob/fbf5e14b7804d3409e27d2d03cead80735a0521f/Lib/test/test_ntpath.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26708/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26708/files#diff-f32eb738dcaaaaeb2ac5bcd885fd517e11c9efc35c44912bef0c725e20c1fbea
https://github.com/python/cpython/pull/26708/files#diff-f32eb738dcaaaaeb2ac5bcd885fd517e11c9efc35c44912bef0c725e20c1fbea
https://github.com/python/cpython/pull/26708/files#diff-f32eb738dcaaaaeb2ac5bcd885fd517e11c9efc35c44912bef0c725e20c1fbea
Lib/test/test_posixpath.pyhttps://github.com/python/cpython/pull/26708/files#diff-2ba0be153d12a4810bc4d509c97d4c244a9f4fd754c1b47d8d7a991238467595
View file https://github.com/barneygale/cpython/blob/fbf5e14b7804d3409e27d2d03cead80735a0521f/Lib/test/test_posixpath.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26708/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26708/files#diff-2ba0be153d12a4810bc4d509c97d4c244a9f4fd754c1b47d8d7a991238467595
https://github.com/python/cpython/pull/26708/files#diff-2ba0be153d12a4810bc4d509c97d4c244a9f4fd754c1b47d8d7a991238467595
https://github.com/python/cpython/pull/26708/files#diff-2ba0be153d12a4810bc4d509c97d4c244a9f4fd754c1b47d8d7a991238467595
Lib/test/test_urllib.pyhttps://github.com/python/cpython/pull/26708/files#diff-111958b1956c05d043a3da3bcf638cff888dff68cddd71f7eeae257fc6080dcb
View file https://github.com/barneygale/cpython/blob/fbf5e14b7804d3409e27d2d03cead80735a0521f/Lib/test/test_urllib.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26708/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26708/files#diff-111958b1956c05d043a3da3bcf638cff888dff68cddd71f7eeae257fc6080dcb
https://github.com/python/cpython/pull/26708/files#diff-111958b1956c05d043a3da3bcf638cff888dff68cddd71f7eeae257fc6080dcb
https://github.com/python/cpython/pull/26708/files#diff-111958b1956c05d043a3da3bcf638cff888dff68cddd71f7eeae257fc6080dcb
https://github.com/python/cpython/pull/26708/files#diff-111958b1956c05d043a3da3bcf638cff888dff68cddd71f7eeae257fc6080dcb
Misc/NEWS.d/next/Library/2021-06-13-17-35-24.bpo-44412.qFjsi6.rsthttps://github.com/python/cpython/pull/26708/files#diff-a522b9bf26da05562110ae53ff916ccb3dec6ff5284e738eaaf8c46f2eecc3a4
View file https://github.com/barneygale/cpython/blob/fbf5e14b7804d3409e27d2d03cead80735a0521f/Misc/NEWS.d/next/Library/2021-06-13-17-35-24.bpo-44412.qFjsi6.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26708/{{ revealButtonHref }}
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.