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/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:52b5f9d9-5d82-d0da-9a71-3d472c0f046c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id81EC:31EA40:852E2:B053A:6969CBE2
html-safe-nonceda2239d347d6b9ab6e722094ce59c20a5cfda8a551fbdd497d020965435c71e0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MUVDOjMxRUE0MDo4NTJFMjpCMDUzQTo2OTY5Q0JFMiIsInZpc2l0b3JfaWQiOiIzMTk5Mzk1MjYzMTA0NTM1NTIyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac7976ed537660e5da3925a85d12b315d060c3293480319167de312d10b47a3ccd
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/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/26141/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: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
Noneacedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056
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
release83c08c21cdda978090dc44364b71aa5bc6dcea79
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/26141/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F26141%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%2F26141%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/26141/files
Reloadhttps://github.com/python/cpython/pull/26141/files
Reloadhttps://github.com/python/cpython/pull/26141/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/26141/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/26141/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-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/files
bpo-44136: remove pathlib._Flavour https://github.com/python/cpython/pull/26141/files#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/files
Please reload this pagehttps://github.com/python/cpython/pull/26141/files
Please reload this pagehttps://github.com/python/cpython/pull/26141/files
pathlib.py https://github.com/python/cpython/pull/26141/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c
test_pathlib.py https://github.com/python/cpython/pull/26141/files#diff-3dd97d2dc8816848d0b0c442e8fdeec9650b3de77935289a93f37ac6396ee17f
Please reload this pagehttps://github.com/python/cpython/pull/26141/files
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.