René's URL Explorer Experiment


Title: gh-81790: support "UNC" device paths in `ntpath.splitdrive()` by barneygale · Pull Request #91882 · python/cpython · GitHub

Open Graph Title: gh-81790: support "UNC" device paths in `ntpath.splitdrive()` by barneygale · Pull Request #91882 · python/cpython

X Title: gh-81790: support "UNC" device paths in `ntpath.splitdrive()` by barneygale · Pull Request #91882 · python/cpython

Description: Adds support in ntpath.splitdrive() for DOS device paths with UNC links (beginning \\?\UNC\). Previous patches for this bug substantially rewrote splitdrive() to improve how other oddities are handled (e.g. double slashes). This patch is more conservative: existing behaviour is maintained except when the prefixes are present. This brings splitdrive() in line with pathlib behaviour, and consequently allows us to factor out a duplicate implementation in pathlib. Fixes #81790 and #85871

Open Graph Description: Adds support in ntpath.splitdrive() for DOS device paths with UNC links (beginning \\?\UNC\). Previous patches for this bug substantially rewrote splitdrive() to improve how other oddities are hand...

X Description: Adds support in ntpath.splitdrive() for DOS device paths with UNC links (beginning \\?\UNC\). Previous patches for this bug substantially rewrote splitdrive() to improve how other oddities are hand...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:5fab40b6-4a45-6cb0-21a3-7badc996c43c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA42A:861EA:14B36D8:1BDBDC9:6969B292
html-safe-nonce8899f34d39c8c6c5c8b874acdf63a1d765e4a95456c9c5440a097887b8127b24
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDJBOjg2MUVBOjE0QjM2RDg6MUJEQkRDOTo2OTY5QjI5MiIsInZpc2l0b3JfaWQiOiIzNjMxODg1NzA1MTY4OTI1MzMwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac08e751fbe482f4ddd3c8a28e750846bcb1863cd60b20fb3a6544e82c58d11557
hovercard-subject-tagpull_request:917473354
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/91882/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:altAdds support in ntpath.splitdrive() for DOS device paths with UNC links (beginning \\?\UNC\). Previous patches for this bug substantially rewrote splitdrive() to improve how other oddities are hand...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb23b8fcc855cd29bb04d6c94aafa62d336bf44eefa8229444eecc968cad03aee
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
release0672399d88424758731ec07fe24509e23bb17fb5
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/91882/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F91882%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%2F91882%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/91882/files
Reloadhttps://github.com/python/cpython/pull/91882/files
Reloadhttps://github.com/python/cpython/pull/91882/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/91882/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 2.1k 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/91882/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
zoobahttps://github.com/zooba
python:mainhttps://github.com/python/cpython/tree/main
barneygale:gh-81790-splitdrive-improvementshttps://github.com/barneygale/cpython/tree/gh-81790-splitdrive-improvements
Conversation 34 https://github.com/python/cpython/pull/91882
Commits 16 https://github.com/python/cpython/pull/91882/commits
Checks 0 https://github.com/python/cpython/pull/91882/checks
Files changed https://github.com/python/cpython/pull/91882/files
Please reload this pagehttps://github.com/python/cpython/pull/91882/files
gh-81790: support "UNC" device paths in ntpath.splitdrive() https://github.com/python/cpython/pull/91882/files#top
Show all changes 16 commits https://github.com/python/cpython/pull/91882/files
c97bfbf gh-81790: support "UNC" device paths in ntpath.splitdrive() barneygale Apr 24, 2022 https://github.com/python/cpython/pull/91882/commits/c97bfbf31fd300d50d60d9e0559d499f11120651
2da18ba Add docs, news, tests. barneygale Apr 24, 2022 https://github.com/python/cpython/pull/91882/commits/2da18baea29bfc9a3d91176666feb5f40d29dbb8
49f9373 Add a couple of comments. barneygale Apr 24, 2022 https://github.com/python/cpython/pull/91882/commits/49f9373ad5f2f69d6d15a00e2595bf54c522cfc6
57840d4 Improve variable names a little barneygale Apr 24, 2022 https://github.com/python/cpython/pull/91882/commits/57840d405db2f9965f219929cab9ae79a521734a
264d79e Address review feedback barneygale Apr 25, 2022 https://github.com/python/cpython/pull/91882/commits/264d79e3429223a637472d96daf2ff572038c842
0652b12 Add a few comments barneygale Apr 25, 2022 https://github.com/python/cpython/pull/91882/commits/0652b1256b2af13fe22ccd552534be8756c27013
bcc561c Fix volume-by-guid path support barneygale Apr 26, 2022 https://github.com/python/cpython/pull/91882/commits/bcc561cb8dfa234ce99842e653101566a8b024a6
40c1eaf Update Lib/ntpath.py barneygale Apr 26, 2022 https://github.com/python/cpython/pull/91882/commits/40c1eafec5fe0f003d484ca95ceb91b1277c127f
34358c8 Update Lib/ntpath.py barneygale Apr 26, 2022 https://github.com/python/cpython/pull/91882/commits/34358c8ae10444caa2a098d0a72079c63dcb894d
0213a72 Update Lib/ntpath.py barneygale Apr 26, 2022 https://github.com/python/cpython/pull/91882/commits/0213a72eade04d30e72141b58a4ce0864d33aaf3
a7fa62b Revise implementation to affect only paths beginning `\\?\UNC\`. barneygale May 28, 2022 https://github.com/python/cpython/pull/91882/commits/a7fa62b5055f122d57f04ffaf5025186b4b85dea
992f59d Undo formatting change. barneygale May 28, 2022 https://github.com/python/cpython/pull/91882/commits/992f59d9037ac031e6093e31210a7cf34db217b8
3f163ff Re-introduce comment with some interesting findings on extended paths. barneygale May 28, 2022 https://github.com/python/cpython/pull/91882/commits/3f163ffadf155df7bb48a421431fc4c34d08e904
4244684 Fix handling of `\\?\UNC` (no trailing slash) barneygale May 31, 2022 https://github.com/python/cpython/pull/91882/commits/4244684aef0ea83d89a8b854b6b6ecabed550b64
471e3b4 Remove extending paths findings comment. barneygale May 31, 2022 https://github.com/python/cpython/pull/91882/commits/471e3b4c3f68f888f8f0534a3062e377460013be
8f9ab9a Remove unnecessary tests barneygale Jun 9, 2022 https://github.com/python/cpython/pull/91882/commits/8f9ab9a9d232d8c2dbe4d2bc3dc9efc4041ea684
Clear filters https://github.com/python/cpython/pull/91882/files
Please reload this pagehttps://github.com/python/cpython/pull/91882/files
Please reload this pagehttps://github.com/python/cpython/pull/91882/files
os.path.rst https://github.com/python/cpython/pull/91882/files#diff-22dc079c4b2ebb7590f7963d2a7ea70133920c3f465d35b421ec9451c563d783
ntpath.py https://github.com/python/cpython/pull/91882/files#diff-892add06b0598c5d7b07448e0ac87f5aa6b97fd0a79d77bcbc69092b70d1d065
pathlib.py https://github.com/python/cpython/pull/91882/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
test_ntpath.py https://github.com/python/cpython/pull/91882/files#diff-f32eb738dcaaaaeb2ac5bcd885fd517e11c9efc35c44912bef0c725e20c1fbea
2022-04-24-22-26-45.gh-issue-81790.M5Rvpm.rst https://github.com/python/cpython/pull/91882/files#diff-11d4733ea6d3e50224760a91f8e78ec82de40ee90fadaacb5107c1a2ab73fe76
Doc/library/os.path.rsthttps://github.com/python/cpython/pull/91882/files#diff-22dc079c4b2ebb7590f7963d2a7ea70133920c3f465d35b421ec9451c563d783
View file https://github.com/barneygale/cpython/blob/8f9ab9a9d232d8c2dbe4d2bc3dc9efc4041ea684/Doc/library/os.path.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/91882/{{ revealButtonHref }}
https://github.com/python/cpython/pull/91882/files#diff-22dc079c4b2ebb7590f7963d2a7ea70133920c3f465d35b421ec9451c563d783
https://github.com/python/cpython/pull/91882/files#diff-22dc079c4b2ebb7590f7963d2a7ea70133920c3f465d35b421ec9451c563d783
Lib/ntpath.pyhttps://github.com/python/cpython/pull/91882/files#diff-892add06b0598c5d7b07448e0ac87f5aa6b97fd0a79d77bcbc69092b70d1d065
View file https://github.com/barneygale/cpython/blob/8f9ab9a9d232d8c2dbe4d2bc3dc9efc4041ea684/Lib/ntpath.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/91882/{{ revealButtonHref }}
https://github.com/python/cpython/pull/91882/files#diff-892add06b0598c5d7b07448e0ac87f5aa6b97fd0a79d77bcbc69092b70d1d065
https://github.com/python/cpython/pull/91882/files#diff-892add06b0598c5d7b07448e0ac87f5aa6b97fd0a79d77bcbc69092b70d1d065
Lib/pathlib.pyhttps://github.com/python/cpython/pull/91882/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
View file https://github.com/barneygale/cpython/blob/8f9ab9a9d232d8c2dbe4d2bc3dc9efc4041ea684/Lib/pathlib.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/91882/{{ revealButtonHref }}
https://github.com/python/cpython/pull/91882/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
Please reload this pagehttps://github.com/python/cpython/pull/91882/files
https://github.com/python/cpython/pull/91882/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
https://github.com/python/cpython/pull/91882/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
Lib/test/test_ntpath.pyhttps://github.com/python/cpython/pull/91882/files#diff-f32eb738dcaaaaeb2ac5bcd885fd517e11c9efc35c44912bef0c725e20c1fbea
View file https://github.com/barneygale/cpython/blob/8f9ab9a9d232d8c2dbe4d2bc3dc9efc4041ea684/Lib/test/test_ntpath.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/91882/{{ revealButtonHref }}
https://github.com/python/cpython/pull/91882/files#diff-f32eb738dcaaaaeb2ac5bcd885fd517e11c9efc35c44912bef0c725e20c1fbea
https://github.com/python/cpython/pull/91882/files#diff-f32eb738dcaaaaeb2ac5bcd885fd517e11c9efc35c44912bef0c725e20c1fbea
Misc/NEWS.d/next/Library/2022-04-24-22-26-45.gh-issue-81790.M5Rvpm.rsthttps://github.com/python/cpython/pull/91882/files#diff-11d4733ea6d3e50224760a91f8e78ec82de40ee90fadaacb5107c1a2ab73fe76
View file https://github.com/barneygale/cpython/blob/8f9ab9a9d232d8c2dbe4d2bc3dc9efc4041ea684/Misc/NEWS.d/next/Library/2022-04-24-22-26-45.gh-issue-81790.M5Rvpm.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/91882/{{ 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.