René's URL Explorer Experiment


Title: gh-99029: Fix handling of `PureWindowsPath('C:\').relative_to('C:')` by barneygale · Pull Request #99031 · python/cpython · GitHub

Open Graph Title: gh-99029: Fix handling of `PureWindowsPath('C:\').relative_to('C:')` by barneygale · Pull Request #99031 · python/cpython

X Title: gh-99029: Fix handling of `PureWindowsPath('C:\').relative_to('C:')` by barneygale · Pull Request #99031 · python/cpython

Description: relative_to() now treats naked drive paths as relative. This brings its behaviour in line with other parts of pathlib, and with ntpath.relpath(), and so allows us to factor out the pathlib-specific...

Open Graph Description: relative_to() now treats naked drive paths as relative. This brings its behaviour in line with other parts of pathlib, and with ntpath.relpath(), and so allows us to factor out the pathlib-specific...

X Description: relative_to() now treats naked drive paths as relative. This brings its behaviour in line with other parts of pathlib, and with ntpath.relpath(), and so allows us to factor out the pathlib-specific...

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

X: @github

direct link

Domain: github.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:5c5a5086-6cd8-4425-5f33-310a897f7e95
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id96F4:2A215C:441FC3:5C9DED:69695F44
html-safe-nonce9e5697a9395e23692a0bd0bd34ca9acaf3b0c0d0062bbbe6fe8b07b9162225d0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NkY0OjJBMjE1Qzo0NDFGQzM6NUM5REVEOjY5Njk1RjQ0IiwidmlzaXRvcl9pZCI6IjMzNzIzNzA2MjEzNjQ3ODkwNjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac39d081b0dbb832dc4ddfc25f5e98206ec8c5ddd1b32695017402c9cc8b67df5b
hovercard-subject-tagpull_request:1108947408
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///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/cpython/99031/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/1e12da8a1eda12e1599150a2fb008a5a2385d4a0bbfb8f8720293d53efff7782/python/cpython/pull/99031
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1e12da8a1eda12e1599150a2fb008a5a2385d4a0bbfb8f8720293d53efff7782/python/cpython/pull/99031
og:image:altrelative_to() now treats naked drive paths as relative. This brings its behaviour in line with other parts of pathlib, and with ntpath.relpath(), and so allows us to factor out the pathlib-specific...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebarneygale
hostnamegithub.com
expected-hostnamegithub.com
None48487c1ad776a7975b7132d95f4240ff3ae37cd5b8e3cb597102a4edb76738f1
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
release669463fcc54773a88c1f5a44eef6b99a5504b9c7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/99031#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F99031
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%2F99031
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%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/99031
Reloadhttps://github.com/python/cpython/pull/99031
Reloadhttps://github.com/python/cpython/pull/99031
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/99031
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/99031
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
Jump to bottomhttps://github.com/python/cpython/pull/99031#issue-comment-box
brettcannonhttps://github.com/brettcannon
python:mainhttps://github.com/python/cpython/tree/main
barneygale:pathlib-relpathhttps://github.com/barneygale/cpython/tree/pathlib-relpath
gh-99029: Fix handling of PureWindowsPath('C:\').relative_to('C:') https://github.com/python/cpython/pull/99031#top
brettcannonhttps://github.com/brettcannon
python:mainhttps://github.com/python/cpython/tree/main
barneygale:pathlib-relpathhttps://github.com/barneygale/cpython/tree/pathlib-relpath
Conversation 20 https://github.com/python/cpython/pull/99031
Commits 5 https://github.com/python/cpython/pull/99031/commits
Checks 0 https://github.com/python/cpython/pull/99031/checks
Files changed https://github.com/python/cpython/pull/99031/files
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
https://github.com/barneygale
barneygalehttps://github.com/barneygale
Nov 2, 2022https://github.com/python/cpython/pull/99031#issue-1433925119
Please reload this pagehttps://github.com/python/cpython/pull/99031
Disagreement between PureWindowsPath.relative_to() and ntpath.relpath() with rootless drives #99029https://github.com/python/cpython/issues/99029
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/barneygale
pythongh-99029https://github.com/python/cpython/issues/99029
: Fix handling of `PureWindowsPath('C:\').relativ…https://github.com/python/cpython/pull/99031/commits/bdfcc65abcb582c79681fb9c9c5c282f4f20fa64
bdfcc65https://github.com/python/cpython/pull/99031/commits/bdfcc65abcb582c79681fb9c9c5c282f4f20fa64
https://github.com/barneygale
barneygalehttps://github.com/barneygale
brettcannonhttps://github.com/brettcannon
code ownerhttps://github.com/python/cpython/blob/c053284e3930027847d5adf99efcb1aa5ccbacd1/.github/CODEOWNERS#L156
November 2, 2022 23:48https://github.com/python/cpython/pull/99031#event-7727980508
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
Nov 2, 2022 https://github.com/python/cpython/pull/99031#ref-issue-1433908295
Disagreement between PureWindowsPath.relative_to() and ntpath.relpath() with rootless drives #99029 https://github.com/python/cpython/issues/99029
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
awaiting review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
Nov 2, 2022https://github.com/python/cpython/pull/99031#event-7727980770
gh-68320, gh-88302 - Allow for pathlib.Path subclassing #31691 https://github.com/python/cpython/pull/31691
gh-78707: deprecate passing >1 argument to PurePath.[is_]relative_to() #94469 https://github.com/python/cpython/pull/94469
gh-84538: add strict argument to pathlib.PurePath.relative_to #19813 https://github.com/python/cpython/pull/19813
https://github.com/domragusa
domragusahttps://github.com/domragusa
Nov 3, 2022https://github.com/python/cpython/pull/99031#issuecomment-1302472599
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/barneygale
barneygalehttps://github.com/barneygale
Nov 3, 2022https://github.com/python/cpython/pull/99031#issuecomment-1302482240
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/barneygale
barneygalehttps://github.com/barneygale
Nov 3, 2022https://github.com/python/cpython/pull/99031#issuecomment-1302502974
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/barneygale
Restore deleted assertionshttps://github.com/python/cpython/pull/99031/commits/4b190a1a11c09d108c8cbfc24054040daf33e1b7
4b190a1https://github.com/python/cpython/pull/99031/commits/4b190a1a11c09d108c8cbfc24054040daf33e1b7
https://github.com/domragusa
domragusahttps://github.com/domragusa
Nov 3, 2022https://github.com/python/cpython/pull/99031#issuecomment-1302553057
GetFullPathNameWhttps://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfullpathnamew
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/barneygale
barneygalehttps://github.com/barneygale
Nov 3, 2022https://github.com/python/cpython/pull/99031#issuecomment-1302580553
Please reload this pagehttps://github.com/python/cpython/pull/99031
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/domragusa
domragusahttps://github.com/domragusa
Nov 3, 2022https://github.com/python/cpython/pull/99031#issuecomment-1302620842
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/barneygale
barneygalehttps://github.com/barneygale
Nov 3, 2022https://github.com/python/cpython/pull/99031#issuecomment-1302622852
Please reload this pagehttps://github.com/python/cpython/pull/99031
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/domragusa
domragusahttps://github.com/domragusa
Nov 3, 2022https://github.com/python/cpython/pull/99031#issuecomment-1302648093
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/barneygale
barneygalehttps://github.com/barneygale
Nov 3, 2022https://github.com/python/cpython/pull/99031#issuecomment-1302658487
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/barneygale
barneygalehttps://github.com/barneygale
Nov 7, 2022https://github.com/python/cpython/pull/99031#issuecomment-1305533687
#99199https://github.com/python/cpython/issues/99199
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/barneygale
Stop using os.path.relpath()https://github.com/python/cpython/pull/99031/commits/4d13ac8c3965458a19ec6d6d24aad543a747461e
4d13ac8https://github.com/python/cpython/pull/99031/commits/4d13ac8c3965458a19ec6d6d24aad543a747461e
https://github.com/barneygale
barneygalehttps://github.com/barneygale
Nov 12, 2022https://github.com/python/cpython/pull/99031#issuecomment-1312381938
#99199 (comment)https://github.com/python/cpython/issues/99199#issuecomment-1312374296
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/barneygale
Simplify algorithm a littlehttps://github.com/python/cpython/pull/99031/commits/3b37a0d77f61adb20cc9c6e96b1895a4bf7764a4
3b37a0dhttps://github.com/python/cpython/pull/99031/commits/3b37a0d77f61adb20cc9c6e96b1895a4bf7764a4
https://github.com/barneygale
barneygalehttps://github.com/barneygale
Nov 13, 2022 https://github.com/python/cpython/pull/99031#ref-issue-1444059294
Clarify the documentation of pathlib.Path.is_relative_to() #99334 https://github.com/python/cpython/issues/99334
https://github.com/brettcannon
brettcannonhttps://github.com/brettcannon
Nov 18, 2022 https://github.com/python/cpython/pull/99031#pullrequestreview-1186906857
View reviewed changes https://github.com/python/cpython/pull/99031/files/3b37a0d77f61adb20cc9c6e96b1895a4bf7764a4
brettcannonhttps://github.com/brettcannon
https://github.com/python/cpython/pull/99031#pullrequestreview-1186906857
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/99031
Lib/pathlib.pyhttps://github.com/python/cpython/pull/99031/files/3b37a0d77f61adb20cc9c6e96b1895a4bf7764a4#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
Please reload this pagehttps://github.com/python/cpython/pull/99031
Lib/pathlib.pyhttps://github.com/python/cpython/pull/99031/files/3b37a0d77f61adb20cc9c6e96b1895a4bf7764a4#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
awaiting changes https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20changes%22
awaiting review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
Nov 18, 2022https://github.com/python/cpython/pull/99031#event-7848047454
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
Nov 18, 2022https://github.com/python/cpython/pull/99031#issuecomment-1320624158
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/barneygale
Use f-strings for exception messageshttps://github.com/python/cpython/pull/99031/commits/a3e551768995ab01c991469e617e843b3c02c264
a3e5517https://github.com/python/cpython/pull/99031/commits/a3e551768995ab01c991469e617e843b3c02c264
https://github.com/barneygale
barneygalehttps://github.com/barneygale
Nov 19, 2022https://github.com/python/cpython/pull/99031#issuecomment-1320721193
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
awaiting change review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20change%20review%22
awaiting changes https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20changes%22
Nov 19, 2022https://github.com/python/cpython/pull/99031#event-7848486359
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
Nov 19, 2022https://github.com/python/cpython/pull/99031#issuecomment-1320721218
@brettcannonhttps://github.com/brettcannon
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
brettcannonhttps://github.com/brettcannon
November 19, 2022 01:12https://github.com/python/cpython/pull/99031#event-7848486484
https://github.com/brettcannon
brettcannonhttps://github.com/brettcannon
Nov 25, 2022 https://github.com/python/cpython/pull/99031#pullrequestreview-1194724379
View reviewed changes https://github.com/python/cpython/pull/99031/files/a3e551768995ab01c991469e617e843b3c02c264
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
awaiting change review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20change%20review%22
Nov 25, 2022https://github.com/python/cpython/pull/99031#event-7894873367
https://github.com/brettcannon
brettcannonhttps://github.com/brettcannon
ae234fbhttps://github.com/python/cpython/commit/ae234fbc5ce045066448f2f0cda2f1c3c7ddebea
Nov 25, 2022https://github.com/python/cpython/pull/99031#event-7894875293
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
Nov 25, 2022https://github.com/python/cpython/pull/99031#event-7894875409
https://github.com/brettcannon
brettcannonhttps://github.com/brettcannon
Nov 25, 2022https://github.com/python/cpython/pull/99031#issuecomment-1327801389
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/barneygale
barneygalehttps://github.com/barneygale
Nov 25, 2022https://github.com/python/cpython/pull/99031#issuecomment-1327851967
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/lazka
lazkahttps://github.com/lazka
Nov 19, 2024 https://github.com/python/cpython/pull/99031#ref-pullrequest-2646031066
external_project: workaround for MinGW mesonbuild/meson#13886 https://github.com/mesonbuild/meson/pull/13886
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F99031
https://github.com/brettcannon
brettcannon https://github.com/brettcannon
https://github.com/python/cpython/pull/99031/files/a3e551768995ab01c991469e617e843b3c02c264
Please reload this pagehttps://github.com/python/cpython/pull/99031
https://github.com/barneygale
https://github.com/domragusa
https://github.com/bedevere-bot
https://github.com/brettcannon
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.