| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:6f4ab600-405f-98a7-2250-91424f659633 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E926:5177D:2129254:2E361BB:69693D4B |
| html-safe-nonce | ad71e3bfe8dcb0f35932a2c375a5a406992c9c62dba8aafa9d8660b3ce9bd305 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTI2OjUxNzdEOjIxMjkyNTQ6MkUzNjFCQjo2OTY5M0Q0QiIsInZpc2l0b3JfaWQiOiIxMTE2MTkwOTM2MjA2Njk3NzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1a993bdd239f308e4211bba5139168bc5e8c1203f2c2d3ed63c2d6af84b2dfff |
| hovercard-subject-tag | pull_request:872134193 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///pull_requests/show/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/31691/files |
| twitter:image | https://avatars.githubusercontent.com/u/960340?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/960340?s=400&v=4 |
| og:image:alt | Users may wish to define subclasses of pathlib.PurePath and Path to add or modify existing methods. Before this change, attempting to instantiate a subclass raised an exception like:
AttributeError... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d69ac0477df0f87da03b8b06cebd187012d7a930 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/python/cpython/pull/31691/files#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F31691%2Ffiles |
| GitHub CopilotWrite better code with AI | https://github.com/features/copilot |
| GitHub SparkBuild and deploy intelligent apps | https://github.com/features/spark |
| GitHub ModelsManage and compare prompts | https://github.com/features/models |
| MCP RegistryNewIntegrate external tools | https://github.com/mcp |
| ActionsAutomate any workflow | https://github.com/features/actions |
| CodespacesInstant dev environments | https://github.com/features/codespaces |
| IssuesPlan and track work | https://github.com/features/issues |
| Code ReviewManage code changes | https://github.com/features/code-review |
| GitHub Advanced SecurityFind and fix vulnerabilities | https://github.com/security/advanced-security |
| Code securitySecure your code as you build | https://github.com/security/advanced-security/code-security |
| Secret protectionStop leaks before they start | https://github.com/security/advanced-security/secret-protection |
| Why GitHub | https://github.com/why-github |
| Documentation | https://docs.github.com |
| Blog | https://github.blog |
| Changelog | https://github.blog/changelog |
| Marketplace | https://github.com/marketplace |
| View all features | https://github.com/features |
| Enterprises | https://github.com/enterprise |
| Small and medium teams | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| App Modernization | https://github.com/solutions/use-case/app-modernization |
| DevSecOps | https://github.com/solutions/use-case/devsecops |
| DevOps | https://github.com/solutions/use-case/devops |
| CI/CD | https://github.com/solutions/use-case/ci-cd |
| View all use cases | https://github.com/solutions/use-case |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| View all industries | https://github.com/solutions/industry |
| View all solutions | https://github.com/solutions |
| AI | https://github.com/resources/articles?topic=ai |
| Software Development | https://github.com/resources/articles?topic=software-development |
| DevOps | https://github.com/resources/articles?topic=devops |
| Security | https://github.com/resources/articles?topic=security |
| View all topics | https://github.com/resources/articles |
| Customer stories | https://github.com/customer-stories |
| Events & webinars | https://github.com/resources/events |
| Ebooks & reports | https://github.com/resources/whitepapers |
| Business insights | https://github.com/solutions/executive-insights |
| GitHub Skills | https://skills.github.com |
| Documentation | https://docs.github.com |
| Customer support | https://support.github.com |
| Community forum | https://github.com/orgs/community/discussions |
| Trust center | https://github.com/trust-center |
| Partners | https://github.com/partners |
| GitHub SponsorsFund open source developers | https://github.com/sponsors |
| Security Lab | https://securitylab.github.com |
| Maintainer Community | https://maintainers.github.com |
| Accelerator | https://github.com/accelerator |
| Archive Program | https://archiveprogram.github.com |
| Topics | https://github.com/topics |
| Trending | https://github.com/trending |
| Collections | https://github.com/collections |
| Enterprise platformAI-powered developer platform | https://github.com/enterprise |
| GitHub Advanced SecurityEnterprise-grade security features | https://github.com/security/advanced-security |
| Copilot for BusinessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/premium-support |
| Pricing | https://github.com/pricing |
| Search syntax tips | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
| documentation | https://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%2F31691%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 |
| Reload | https://github.com/python/cpython/pull/31691/files |
| Reload | https://github.com/python/cpython/pull/31691/files |
| Reload | https://github.com/python/cpython/pull/31691/files |
|
python
| https://github.com/python |
| cpython | https://github.com/python/cpython |
| Please reload this page | https://github.com/python/cpython/pull/31691/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
2k
| 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 page | https://github.com/python/cpython/pull/31691/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 service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose |
| brettcannon | https://github.com/brettcannon |
| python:main | https://github.com/python/cpython/tree/main |
| barneygale:bpo-44136-remove-pathlib-flavour-2 | https://github.com/barneygale/cpython/tree/bpo-44136-remove-pathlib-flavour-2 |
|
Conversation
172
| https://github.com/python/cpython/pull/31691 |
|
Commits
53
| https://github.com/python/cpython/pull/31691/commits |
|
Checks
0
| https://github.com/python/cpython/pull/31691/checks |
|
Files changed
| https://github.com/python/cpython/pull/31691/files |
| Please reload this page | https://github.com/python/cpython/pull/31691/files |
|
gh-68320, gh-88302 - Allow for pathlib.Path subclassing
| https://github.com/python/cpython/pull/31691/files#top |
|
Show all changes
53 commits
| https://github.com/python/cpython/pull/31691/files |
|
7371220
bpo-24132, bpo-44136 - Fix `pathlib.Path` subclassing.
barneygale Mar 5, 2022
| https://github.com/python/cpython/pull/31691/commits/7371220586c8367d80867f340381740347d7aea1 |
|
8431d12
Add tests
barneygale Mar 5, 2022
| https://github.com/python/cpython/pull/31691/commits/8431d1214140a9a1ab02b178bdf84bf083dd2425 |
|
bf2ad3a
Add tests for PurePath subclasses
barneygale Mar 5, 2022
| https://github.com/python/cpython/pull/31691/commits/bf2ad3aead98c85b181c5cae2541135e0f110523 |
|
4036e2e
Update Misc/NEWS.d/next/Library/2022-03-05-02-14-09.bpo-24132.W6iORO.rst
barneygale Mar 5, 2022
| https://github.com/python/cpython/pull/31691/commits/4036e2e955cc9720447f7b3700a2b9b755e32cf2 |
|
0d08533
Rename `PurePath._pathmod` to `PurePath._flavour` to reduce the diff.
barneygale Mar 5, 2022
| https://github.com/python/cpython/pull/31691/commits/0d08533ca9c4938873ff826ea098cacef0d2374d |
|
0ad8022
Merge branch 'bpo-44136-remove-pathlib-flavour-2' of github.com:barne…
barneygale Mar 5, 2022
| https://github.com/python/cpython/pull/31691/commits/0ad8022acfc0389e3c976c2e43b364762dc7278b |
|
28992fc
Undo an unnecessary change to `Path.__new__()`
barneygale Mar 25, 2022
| https://github.com/python/cpython/pull/31691/commits/28992fc69d90afe67b99ba967ea28250d565af30 |
|
dbec230
Remove `_casefold()` and `_casefold_parts()` methods.
barneygale Mar 25, 2022
| https://github.com/python/cpython/pull/31691/commits/dbec2300fe7010282b78a64284b08073d35ec6d4 |
|
d814ee4
Merge branch 'main' into bpo-44136-remove-pathlib-flavour-2
barneygale Apr 29, 2022
| https://github.com/python/cpython/pull/31691/commits/d814ee4b4cd01ca15a6e74f5e9262a9abda18cfc |
|
63f1d68
Further simplify overall diff by inlining code from `compile_pattern()`
barneygale Apr 29, 2022
| https://github.com/python/cpython/pull/31691/commits/63f1d6834f7087881c3704ae2fa6a2842cdf3815 |
|
8dddfdf
Apply suggestions from code review
barneygale Apr 29, 2022
| https://github.com/python/cpython/pull/31691/commits/8dddfdf995791e1cc081078cb73b79f2f35488f9 |
|
b4da721
Address a couple bits of review feedback
barneygale Apr 29, 2022
| https://github.com/python/cpython/pull/31691/commits/b4da721300395af003f1237d071c7e14bfb1925a |
|
7a166fd
Fix tests
barneygale Apr 29, 2022
| https://github.com/python/cpython/pull/31691/commits/7a166fdb493d59b20d3b323cfb9e1b93930c4261 |
|
1f4dff1
Fix docstring formatting.
barneygale Apr 29, 2022
| https://github.com/python/cpython/pull/31691/commits/1f4dff11b267ef0f94f0930a8ece44bccea0df6f |
|
51893c1
Remove FIXME comments
barneygale Apr 30, 2022
| https://github.com/python/cpython/pull/31691/commits/51893c11c5e794f1072acbe57b0ae921a431c33d |
|
48b49b6
Merge branch 'main' into bpo-44136-remove-pathlib-flavour-2
barneygale Apr 30, 2022
| https://github.com/python/cpython/pull/31691/commits/48b49b624753a9a3f73e225700f81ad21b93b6e4 |
|
3624c97
Update Lib/pathlib.py
barneygale May 3, 2022
| https://github.com/python/cpython/pull/31691/commits/3624c974507457b00bc7a24531fcca2f0961ea55 |
|
ab54c14
Remove vestigal 'casefold' names.
barneygale May 31, 2022
| https://github.com/python/cpython/pull/31691/commits/ab54c14661b0c98d79be140e2be4ac718b05568f |
|
2627417
Merge branch 'main' into bpo-44136-remove-pathlib-flavour-2
barneygale Jun 10, 2022
| https://github.com/python/cpython/pull/31691/commits/2627417656b5e4a39c1936e4440aa448757a4bc8 |
|
bc7aded
Restore comment on POSIX paths beginning `//` and tweak implementation.
barneygale Jun 10, 2022
| https://github.com/python/cpython/pull/31691/commits/bc7aded29a523bdd580d7f329ad88d89131f9695 |
|
4d6e4f3
Inline `_join_parsed_parts()` and `_make_child()` in `joinpath()`.
barneygale Jun 12, 2022
| https://github.com/python/cpython/pull/31691/commits/4d6e4f3ee6d6017a59cfc0ea8a9e27653c28332e |
|
70ca838
Update Lib/pathlib.py
barneygale Jun 13, 2022
| https://github.com/python/cpython/pull/31691/commits/70ca8388163f876c6f2d4aa491dd8d504aca7bb4 |
|
a2cc74f
Remove unused import
barneygale Jun 16, 2022
| https://github.com/python/cpython/pull/31691/commits/a2cc74f3dd9b28baee80e77cda8517566d74758e |
|
0e2478b
Make NEWS entry more precise.
barneygale Jun 17, 2022
| https://github.com/python/cpython/pull/31691/commits/0e2478bbac3c60e7b3d116d0fb3b69f11da49476 |
|
0d0cf60
Apply suggestions from code review
barneygale Jul 29, 2022
| https://github.com/python/cpython/pull/31691/commits/0d0cf6012cd0aae28f923ab99ab05c04f2d78c94 |
|
f3048d3
Clarify `_pparts` and `_ncparts` naming.
barneygale Jul 29, 2022
| https://github.com/python/cpython/pull/31691/commits/f3048d312d72e9f1cac381aab8238c702a640161 |
|
8a213ae
Tidy up usage of `normcase()`
barneygale Jul 30, 2022
| https://github.com/python/cpython/pull/31691/commits/8a213ae1d5600d383451950c2a634d9b601d8987 |
|
402dafe
Tweak `is_absolute()` to use `os.path.isabs()` wherever possible.
barneygale Jul 30, 2022
| https://github.com/python/cpython/pull/31691/commits/402dafe63d8a11a6916d549ada1918ce962a8653 |
|
5cc3ab2
Stop using `self._flavour` in `as_uri()`.
barneygale Jul 30, 2022
| https://github.com/python/cpython/pull/31691/commits/5cc3ab2eb9a49ad2dfc1bb764cdc02c524b92951 |
|
19a8804
Remove `cls._flavour` identity check in `_parse_parts()`.
barneygale Jul 30, 2022
| https://github.com/python/cpython/pull/31691/commits/19a88045cf9c9bbde393d209fd93e88160bc53c4 |
|
9da46bc
Fix Windows tests
barneygale Jul 30, 2022
| https://github.com/python/cpython/pull/31691/commits/9da46bc3a874b90ac9d7b6581d5e1ff9481fbc9b |
|
29f9f81
Restore `_split_root()` method and its tests.
barneygale Aug 1, 2022
| https://github.com/python/cpython/pull/31691/commits/29f9f8120779587f1a9fa2c40cbd3e52cb66ad63 |
|
52851b8
Merge branch 'main' into bpo-44136-remove-pathlib-flavour-2
barneygale Aug 5, 2022
| https://github.com/python/cpython/pull/31691/commits/52851b82b4c2e16a699cf19e4e1a9affbab79ae3 |
|
b39da53
Optimize `_split_root()`
barneygale Aug 12, 2022
| https://github.com/python/cpython/pull/31691/commits/b39da536dc355d274e228d7810bbac20d0b70916 |
|
c7b18b1
Merge branch 'main' into bpo-44136-remove-pathlib-flavour-2
barneygale Aug 13, 2022
| https://github.com/python/cpython/pull/31691/commits/c7b18b19ed99810ef50611d6bd994c260531e7d2 |
|
806ad15
Move `is_reserved()` implementation into `os.path` as a private funct…
barneygale Aug 23, 2022
| https://github.com/python/cpython/pull/31691/commits/806ad150ac5f7397623ea5d0c6869f3b7d43b6a1 |
|
a350009
Use `os.path.normcase()` when globbing.
barneygale Aug 23, 2022
| https://github.com/python/cpython/pull/31691/commits/a35000959fe4f1ae83b8c1bd4369f728c185d92a |
|
799b40e
Simplify `_split_root()` implementation.
barneygale Aug 25, 2022
| https://github.com/python/cpython/pull/31691/commits/799b40ef2ed0aa9479a05e6bd6c0fa1a7b0adda3 |
|
a6b25ea
Remove tests for malformed UNC paths
barneygale Aug 26, 2022
| https://github.com/python/cpython/pull/31691/commits/a6b25ea8e0954782e50cd70077daedcf195a8ec4 |
|
ac6f6e2
Merge branch 'main' into bpo-44136-remove-pathlib-flavour-2
brettcannon Aug 26, 2022
| https://github.com/python/cpython/pull/31691/commits/ac6f6e2d40b30836d76800ffea8483be560c2a55 |
|
b8874df
Revert "Move `is_reserved()` implementation into `os.path` as a priva…
barneygale Aug 27, 2022
| https://github.com/python/cpython/pull/31691/commits/b8874dfed181f2be6c331ddf1a4a68a64e396bd6 |
|
9d5e18a
Tweak _split_root() to use removesuffix()
barneygale Aug 27, 2022
| https://github.com/python/cpython/pull/31691/commits/9d5e18a3502a8941783dcad0c9f0e4a65ccb68c6 |
|
f73f426
Remove test that `/b/c/d` and `///b/c/d` are equivalent.
barneygale Aug 27, 2022
| https://github.com/python/cpython/pull/31691/commits/f73f426d1eb2625722f1e6a8287c2b495ed6f0bc |
|
37e4bc1
Restore comment linking to *Naming Files* page in Microsoft docs
barneygale Sep 16, 2022
| https://github.com/python/cpython/pull/31691/commits/37e4bc1e06907b59878c8ae23e6071a58c68b404 |
|
e3f13ef
Apply suggestions from code review
barneygale Nov 7, 2022
| https://github.com/python/cpython/pull/31691/commits/e3f13efcbed4241f65fbdc44d4962ef9a7ee3d66 |
|
ff4e1b3
Merge branch 'main' into bpo-44136-remove-pathlib-flavour-2
barneygale Nov 15, 2022
| https://github.com/python/cpython/pull/31691/commits/ff4e1b362a0d90ba5d11f7fddf26ddb21fdffbc6 |
|
07c67d0
Clarify repr roundtrip tests.
barneygale Nov 15, 2022
| https://github.com/python/cpython/pull/31691/commits/07c67d00f68adf2c160895ba9ec0a32408e2d173 |
|
950aa47
Reduce tests diff
barneygale Nov 15, 2022
| https://github.com/python/cpython/pull/31691/commits/950aa47d638cd1feb50c93f09a10b2ba89f4b2f4 |
|
d5f6f03
Remove test that `/b/c/d` and `///b/c/d` are equivalent.
barneygale Aug 27, 2022
| https://github.com/python/cpython/pull/31691/commits/d5f6f0332acc02f18bcfeffee94cd7eee0f5c4f2 |
|
b66a4fb
Fix missing full stops.
barneygale Nov 15, 2022
| https://github.com/python/cpython/pull/31691/commits/b66a4fbf50a05f51e52f3f1c8f2a5a0345c0810e |
|
fbaadf4
Remove four more test assertions affected by #96290
barneygale Nov 15, 2022
| https://github.com/python/cpython/pull/31691/commits/fbaadf45d443c33a1df8d1122aee0805de3c7822 |
|
3692fdf
Merge branch 'main' into bpo-44136-remove-pathlib-flavour-2
barneygale Nov 25, 2022
| https://github.com/python/cpython/pull/31691/commits/3692fdf498fba56e46f21a0e3ac89e0821f79bd8 |
|
40dc514
Wrap repr test cases in `self.subTest()` block
barneygale Dec 17, 2022
| https://github.com/python/cpython/pull/31691/commits/40dc5147b6da2c16d42f817d6eec24b30501e24f |
|
Clear filters
| https://github.com/python/cpython/pull/31691/files |
| Please reload this page | https://github.com/python/cpython/pull/31691/files |
| Please reload this page | https://github.com/python/cpython/pull/31691/files |
|
pathlib.py
| https://github.com/python/cpython/pull/31691/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
test_pathlib.py
| https://github.com/python/cpython/pull/31691/files#diff-3dd97d2dc8816848d0b0c442e8fdeec9650b3de77935289a93f37ac6396ee17f |
|
2022-03-05-02-14-09.bpo-24132.W6iORO.rst
| https://github.com/python/cpython/pull/31691/files#diff-91c7091668fd4c037e5f8110c32036f50ed3dc2ad4eb6229e06bebafe7fa7c10 |
| Please reload this page | https://github.com/python/cpython/pull/31691/files |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |