René's URL Explorer Experiment


Title: urllib.request.url2pathname() mishandles non-empty authority sections on POSIX · Issue #126838 · python/cpython · GitHub

Open Graph Title: urllib.request.url2pathname() mishandles non-empty authority sections on POSIX · Issue #126838 · python/cpython

X Title: urllib.request.url2pathname() mishandles non-empty authority sections on POSIX · Issue #126838 · python/cpython

Description: Bug report Bug description: URLs supplied to urllib.request.url2pathname() may include a non-empty authority (netloc), such as a hostname. On Windows, these are correctly decoded (mostly): >>> url2pathname('//localhost/c:/foo.txt') 'C:\\...

Open Graph Description: Bug report Bug description: URLs supplied to urllib.request.url2pathname() may include a non-empty authority (netloc), such as a hostname. On Windows, these are correctly decoded (mostly): >>> url2...

X Description: Bug report Bug description: URLs supplied to urllib.request.url2pathname() may include a non-empty authority (netloc), such as a hostname. On Windows, these are correctly decoded (mostly): >>...

Opengraph URL: https://github.com/python/cpython/issues/126838

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"urllib.request.url2pathname() mishandles non-empty authority sections on POSIX","articleBody":"# Bug report\r\n\r\n### Bug description:\r\n\r\nURLs supplied to `urllib.request.url2pathname()` may include a non-empty authority (netloc), such as a hostname.\r\n\r\nOn Windows, these are correctly decoded ([mostly](https://github.com/python/cpython/issues/126367)):\r\n\r\n```python\r\n>>> url2pathname('//localhost/c:/foo.txt')\r\n'C:\\\\foo.txt'  # OK\r\n>>> url2pathname('//server/share')\r\n'\\\\\\\\server\\\\share'  # OK\r\n```\r\n\r\nBut on POSIX, any non-empty authority except `localhost` is preserved in the path:\r\n\r\n```python\r\n>>> url2pathname('//myhostname/etc/hosts')\r\n'//myhostname/etc/hosts'  # expected '/etc/hosts'\r\n>>> url2pathname('//server/share')\r\n'//server/share'  # expected URLError ('server' is not local)\r\n```\r\n\r\nPer [RFC 8089](https://datatracker.ietf.org/doc/html/rfc8089#section-2) this isn't correct.\r\n\r\n### CPython versions tested on:\r\n\r\nCPython main branch\r\n\r\n### Operating systems tested on:\r\n\r\nLinux\r\n\r\n\u003c!-- gh-linked-prs -->\r\n### Linked PRs\r\n* gh-126844\r\n\u003c!-- /gh-linked-prs -->\r\n","author":{"url":"https://github.com/barneygale","@type":"Person","name":"barneygale"},"datePublished":"2024-11-14T20:35:34Z","url":"https://github.com/python/cpython/issues/126838"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f93c23fc-727d-1658-9568-01e7cd32d5eb
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAE18:39FDE1:D796E9:10E7367:6B022F5B
html-safe-noncebb0bff8384dc2d90fbc7439f9730dd08caecc033a8c7505b732659c5748328c6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTE4OjM5RkRFMTpENzk2RTk6MTBFNzM2Nzo2QjAyMkY1QiIsInZpc2l0b3JfaWQiOiIyODkwNzcxMDY3OTk4MTg3MzU2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac8e745c05929876165ac7b3afa07a010af014ab0deab7d5673ce2fcef5e7a2cb0
hovercard-subject-tagissue:2660004662
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/126838/issue_layout
twitter:imagehttps://opengraph.githubassets.com/08ab086c10c107db8357709c2a8a776dd3e03116baf488d54adaab3322958831/python/cpython/issues/126838
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/08ab086c10c107db8357709c2a8a776dd3e03116baf488d54adaab3322958831/python/cpython/issues/126838
og:image:altBug report Bug description: URLs supplied to urllib.request.url2pathname() may include a non-empty authority (netloc), such as a hostname. On Windows, these are correctly decoded (mostly): >>> url2...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebarneygale
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/126838#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F126838
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F126838
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/126838
Reloadhttps://github.com/python/cpython/issues/126838
Reloadhttps://github.com/python/cpython/issues/126838
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/126838
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/126838
urllib.request.url2pathname() mishandles non-empty authority sections on POSIXhttps://github.com/python/cpython/issues/126838#top
3.12only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.12%22
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/barneygale
barneygalehttps://github.com/barneygale
on Nov 14, 2024https://github.com/python/cpython/issues/126838#issue-2660004662
mostlyhttps://github.com/python/cpython/issues/126367
RFC 8089https://datatracker.ietf.org/doc/html/rfc8089#section-2
GH-123599: url2pathname(): handle authority section in file URL #126844https://github.com/python/cpython/pull/126844
barneygalehttps://github.com/barneygale
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
3.12only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.12%22
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
on Nov 14, 2024https://github.com/python/cpython/issues/126838#event-15304127740
barneygalehttps://github.com/barneygale
on Nov 14, 2024https://github.com/python/cpython/issues/126838#event-15304532958
pythonGH-126838: `url2pathname()`: handle non-empty authority section…https://github.com/barneygale/cpython/commit/50231c5752206b5169bc261ba7c563db6231e048
pythonGH-126838https://github.com/python/cpython/issues/126838
50231c5https://github.com/barneygale/cpython/commit/50231c5752206b5169bc261ba7c563db6231e048
Merge branch 'main' into pythongh-126838https://github.com/barneygale/cpython/commit/96fdb01718c7ded3e245077a3ca1777b8ce80f5e
pythongh-126838https://github.com/python/cpython/issues/126838
96fdb01https://github.com/barneygale/cpython/commit/96fdb01718c7ded3e245077a3ca1777b8ce80f5e
Merge branch 'main' into pythongh-126838https://github.com/barneygale/cpython/commit/52010ca1087b276aec4b31c712667000b0e44681
pythongh-126838https://github.com/python/cpython/issues/126838
52010cahttps://github.com/barneygale/cpython/commit/52010ca1087b276aec4b31c712667000b0e44681
https://github.com/barneygale
barneygalehttps://github.com/barneygale
on Nov 27, 2024https://github.com/python/cpython/issues/126838#issuecomment-2504351923
#123599https://github.com/python/cpython/issues/123599
barneygalehttps://github.com/barneygale
not plannedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Nov 27, 2024https://github.com/python/cpython/issues/126838#event-15455429761
barneygalehttps://github.com/barneygale
on Mar 19, 2025https://github.com/python/cpython/issues/126838#event-16878597489
Merge branch 'main' into pythongh-126838https://github.com/barneygale/cpython/commit/f64ca0d3f3f07f025d94d1e5033b56bb57fcd65a
pythongh-126838https://github.com/python/cpython/issues/126838
f64ca0dhttps://github.com/barneygale/cpython/commit/f64ca0d3f3f07f025d94d1e5033b56bb57fcd65a
Merge branch 'main' into pythongh-126838https://github.com/barneygale/cpython/commit/69807b4a83e198b77cdc6a600f791ab06e29d6b6
pythongh-126838https://github.com/python/cpython/issues/126838
69807b4https://github.com/barneygale/cpython/commit/69807b4a83e198b77cdc6a600f791ab06e29d6b6
Merge branch 'main' into pythongh-126838https://github.com/barneygale/cpython/commit/b4fa510215dfa8ad9f0fe3d0cf77d7a2a9ce0f4b
pythongh-126838https://github.com/python/cpython/issues/126838
b4fa510https://github.com/barneygale/cpython/commit/b4fa510215dfa8ad9f0fe3d0cf77d7a2a9ce0f4b
barneygalehttps://github.com/barneygale
on Apr 10, 2025https://github.com/python/cpython/issues/126838#event-17212456439
Merge branch 'main' into pythongh-126838https://github.com/barneygale/cpython/commit/eecff9bc2a8d199fb33fbb9ca2b914d45610490c
pythongh-126838https://github.com/python/cpython/issues/126838
eecff9bhttps://github.com/barneygale/cpython/commit/eecff9bc2a8d199fb33fbb9ca2b914d45610490c
agoscinskihttps://github.com/agoscinski
on Feb 28, 2026https://github.com/python/cpython/issues/126838#event-23157827881
Replace `urllib.request.url2pathname` with local shim for Python 3.14https://github.com/agoscinski/aiida-core/commit/03a0f6345cb28e9fefe0601c9a6bb65a1aa59721
03a0f63https://github.com/agoscinski/aiida-core/commit/03a0f6345cb28e9fefe0601c9a6bb65a1aa59721
Replace `urllib.request.url2pathname` with local shim for Python 3.14https://github.com/agoscinski/aiida-core/commit/b4ca165908f3dbcddab2f71ef913bf2d654e4cd3
b4ca165https://github.com/agoscinski/aiida-core/commit/b4ca165908f3dbcddab2f71ef913bf2d654e4cd3
Replace `urllib.request.url2pathname` with local shim for Python 3.14https://github.com/agoscinski/aiida-core/commit/6405e1e0b04a299608a11d981040b0faeef595b2
6405e1ehttps://github.com/agoscinski/aiida-core/commit/6405e1e0b04a299608a11d981040b0faeef595b2
Replace `urllib.request.url2pathname` with local shim for Python 3.14 (…https://github.com/agoscinski/aiida-core/commit/e007df450e9df2ede751c7aa3f64866446e6c895
…https://github.com/aiidateam/aiida-core/pull/7240
e007df4https://github.com/agoscinski/aiida-core/commit/e007df450e9df2ede751c7aa3f64866446e6c895
Replace `urllib.request.url2pathname` with local shim for Python 3.14 (…https://github.com/agoscinski/aiida-core/commit/a062fb4455b4b45c78c3fe81349db2d6678b4710
…https://github.com/aiidateam/aiida-core/pull/7240
a062fb4https://github.com/agoscinski/aiida-core/commit/a062fb4455b4b45c78c3fe81349db2d6678b4710
Replace `urllib.request.url2pathname` with local shim for Python 3.14 (…https://github.com/agoscinski/aiida-core/commit/f1c833734094eef1584d0d3541b0206c0a21b616
…https://github.com/aiidateam/aiida-core/pull/7240
f1c8337https://github.com/agoscinski/aiida-core/commit/f1c833734094eef1584d0d3541b0206c0a21b616
Replace `urllib.request.url2pathname` with local shim for Python 3.14 (…https://github.com/agoscinski/aiida-core/commit/3e6e2a3df381159f0aec11ee45bb0ebdaf2bd4ae
…https://github.com/aiidateam/aiida-core/pull/7240
3e6e2a3https://github.com/agoscinski/aiida-core/commit/3e6e2a3df381159f0aec11ee45bb0ebdaf2bd4ae
Replace `urllib.request.url2pathname` with local shim for Python 3.14 (…https://github.com/aiidateam/aiida-core/commit/1607da454428da25544f100d1306cc57a91301b9
…https://github.com/aiidateam/aiida-core/pull/7240
1607da4https://github.com/aiidateam/aiida-core/commit/1607da454428da25544f100d1306cc57a91301b9
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/126838
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/126838
3.12only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.12%22
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
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.