René's URL Explorer Experiment


Title: bpo-44136: remove `pathlib._Flavour` by barneygale · Pull Request #26141 · python/cpython · GitHub

Open Graph Title: bpo-44136: remove `pathlib._Flavour` by barneygale · Pull Request #26141 · python/cpython

X Title: bpo-44136: remove `pathlib._Flavour` by barneygale · Pull Request #26141 · python/cpython

Description: For bpo-24132, we'd like subclasses of AbstractPath to be able to customize flavour behaviour (like as_uri()) without needing to promote _Flavour to a public class. (Copy-pasted bug description:) Following #18841, #25264 and #25701, pathlib._Flavour and its subclasses are looking a bit pointless. The implementations of is_reserved() and make_uri() (~as_uri()) can be readily moved to into PurePosixPath and PureWindowsPath, which removes some indirection. This follows the pattern of OS-specific stuff in PosixPath and WindowsPath. The remaining methods, such as splitroot(), can be pulled into Pure*Path with an underscore prefix. I'm generally a believer in composition over inheritance, but in this case _Flavour seems too small and too similar to PurePath to separate out into 3 extra classes. There should be no impact on public APIs or performance. I've tried to split the changes up across commits; it may be easier to browse the diff that way. https://bugs.python.org/issue44136

Open Graph Description: For bpo-24132, we'd like subclasses of AbstractPath to be able to customize flavour behaviour (like as_uri()) without needing to promote _Flavour to a public class. (Copy-pasted bug description...

X Description: For bpo-24132, we'd like subclasses of AbstractPath to be able to customize flavour behaviour (like as_uri()) without needing to promote _Flavour to a public class. (Copy-pasted bug descrip...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits/:range(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:571bdc05-987a-2885-c3b1-a9787084d125
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB512:C6FAC:611669:7EC47A:69965992
html-safe-nonce988b27275a6483d188b970c79959355505c74ea5e2fc84048248b840a4189e95
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTEyOkM2RkFDOjYxMTY2OTo3RUM0N0E6Njk5NjU5OTIiLCJ2aXNpdG9yX2lkIjoiNzc1MjIwMjc4MTc1OTc4OTQ1OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacdef06fff5723edb4c1b5523e5a866181277c175951ef0522e1601bf166fdca4a
hovercard-subject-tagpull_request:645104524
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/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8
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:altFor bpo-24132, we'd like subclasses of AbstractPath to be able to customize flavour behaviour (like as_uri()) without needing to promote _Flavour to a public class. (Copy-pasted bug description...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonebb5fc598983958d677e5179b50e71c2bfa2a8ac1568110d429775cd645bbe799
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasedb215ff24c4b7248f8b34cafbe2f845e4cbbeb37
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F26141%2Fcommits%2Fb4beecc71e1bb5c117e51e6022982b6c1bac56d8
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%2F26141%2Fcommits%2Fb4beecc71e1bb5c117e51e6022982b6c1bac56d8
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%2Fcommits&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8
Reloadhttps://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8
Reloadhttps://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 34.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.6k 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 0 https://github.com/python/cpython/security
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-44136-remove-pathlib-flavourhttps://github.com/barneygale/cpython/tree/bpo-44136-remove-pathlib-flavour
Conversation 11 https://github.com/python/cpython/pull/26141
Commits 14 https://github.com/python/cpython/pull/26141/commits
Checks 0 https://github.com/python/cpython/pull/26141/checks
Files changed https://github.com/python/cpython/pull/26141/files
Please reload this pagehttps://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8
bpo-44136: remove pathlib._Flavour https://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8#top
Show all changes 14 commits https://github.com/python/cpython/pull/26141/files
3655d5e Remove `flavour.is_reserved()` barneygale May 14, 2021 https://github.com/python/cpython/pull/26141/commits/3655d5ef6ae3923929a9ba6d3185962ea55b1f35
0faa6d0 Remove `flavour.make_uri()` barneygale May 14, 2021 https://github.com/python/cpython/pull/26141/commits/0faa6d0df4862d5b6024ea66101fa50e49f8c1fe
3094398 Remove `flavour.join()`, `flavour.sep` and `flavour.altsep` barneygale May 14, 2021 https://github.com/python/cpython/pull/26141/commits/3094398b4aad5e0e0424fb23c8dce96d35958956
00f6126 Remove `flavour.join_parsed_parts()` barneygale May 14, 2021 https://github.com/python/cpython/pull/26141/commits/00f6126807c29c197a7726d0ec9d8819c55af2b1
6ea7eae Remove `flavour.parse_parts()`, `flavour.splitroot()` and `flavour.pa… barneygale May 15, 2021 https://github.com/python/cpython/pull/26141/commits/6ea7eaed57cf38550e63b1c922176ccec5be4b91
66f5453 Remove `flavour.compile_pattern()` barneygale May 15, 2021 https://github.com/python/cpython/pull/26141/commits/66f5453f8eb80bad4406858c48dd5662936a0070
3d27707 Remove `flavour.is_supported` barneygale May 15, 2021 https://github.com/python/cpython/pull/26141/commits/3d277071ec5ecf19e2b12fe9d521cf01c4f0abfc
b4beecc Remove `flavour.has_drv`. barneygale May 15, 2021 https://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8
3cf15c6 Remove `flavour.casefold()` and `flavour.casefold_parts()` barneygale May 15, 2021 https://github.com/python/cpython/pull/26141/commits/3cf15c68acba6683a9052736d1f4d8c05db1b7db
0897d9d Remove `_Flavour`, `_WindowsFlavour` and `_PosixFlavour` barneygale May 15, 2021 https://github.com/python/cpython/pull/26141/commits/0897d9d2b9f79394e63911f39b66158b3e8ddaa1
4e918e4 Simplify Path construction. barneygale May 15, 2021 https://github.com/python/cpython/pull/26141/commits/4e918e4c4abd57fa3c3da624472b8cbf35935c91
f0beb66 Move Windows constants to module scope. barneygale May 15, 2021 https://github.com/python/cpython/pull/26141/commits/f0beb661aea0bb0e9464f741409a77c4acb256cf
22942e4 Remove `Path._supported` barneygale May 15, 2021 https://github.com/python/cpython/pull/26141/commits/22942e40a22c399658e5925b0211c942107833c0
6f9fd60 Move `PurePosixPath._splitroot()`, `is_absolute()` and `is_reserved()… barneygale May 15, 2021 https://github.com/python/cpython/pull/26141/commits/6f9fd60d1ce94392ff288e0930150bc37cea7b3d
Clear filters https://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8
Please reload this pagehttps://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8
Please reload this pagehttps://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8
Prev https://github.com/python/cpython/pull/26141/commits/3d277071ec5ecf19e2b12fe9d521cf01c4f0abfc
Next https://github.com/python/cpython/pull/26141/commits/3cf15c68acba6683a9052736d1f4d8c05db1b7db
Please reload this pagehttps://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8
https://github.com/barneygale
barneygalehttps://github.com/python/cpython/commits?author=barneygale
Lib/pathlib.pyhttps://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
View file https://github.com/barneygale/cpython/blob/b4beecc71e1bb5c117e51e6022982b6c1bac56d8/Lib/pathlib.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26141/commits/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
https://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
https://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
https://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
https://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
https://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
https://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
https://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
https://github.com/python/cpython/pull/26141/commits/b4beecc71e1bb5c117e51e6022982b6c1bac56d8#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
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.