| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:89cc9a48-193c-f342-4715-d8b158d84bc7 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DA38:31EA40:8C4598:BEF32B:6969E6E3 |
| html-safe-nonce | 7193b614076c4e0ae0fc122ecba6b0456fbf46ce0a5dae377c6f5d602ef19d9a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTM4OjMxRUE0MDo4QzQ1OTg6QkVGMzJCOjY5NjlFNkUzIiwidmlzaXRvcl9pZCI6IjQwNTUyNTM2MDIzMzY4OTI2NDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5d475eb361efc8f06b5f84c117105c886518c48e52e976e6efd01cd4e9aade9b |
| hovercard-subject-tag | pull_request:1229157490 |
| 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/101560/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 | PurePath now normalises and splits paths only when necessary, e.g. when .name or .parent is accessed. The result is cached. This speeds up path object construction by around 4x.
PurePath.__fspath__... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| 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 | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/python/cpython/pull/101560/files#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F101560%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%2F101560%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/101560/files |
| Reload | https://github.com/python/cpython/pull/101560/files |
| Reload | https://github.com/python/cpython/pull/101560/files |
|
python
| https://github.com/python |
| cpython | https://github.com/python/cpython |
| Please reload this page | https://github.com/python/cpython/pull/101560/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 page | https://github.com/python/cpython/pull/101560/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 |
| barneygale | https://github.com/barneygale |
| python:main | https://github.com/python/cpython/tree/main |
| barneygale:optimize-pathlib-part-2b | https://github.com/barneygale/cpython/tree/optimize-pathlib-part-2b |
|
Conversation
5
| https://github.com/python/cpython/pull/101560 |
|
Commits
16
| https://github.com/python/cpython/pull/101560/commits |
|
Checks
0
| https://github.com/python/cpython/pull/101560/checks |
|
Files changed
| https://github.com/python/cpython/pull/101560/files |
| Please reload this page | https://github.com/python/cpython/pull/101560/files |
|
GH-101362: Optimise pathlib by deferring path normalisation
| https://github.com/python/cpython/pull/101560/files#top |
|
Show all changes
16 commits
| https://github.com/python/cpython/pull/101560/files |
|
b428069
GH-101362 - Optimise pathlib by deferring path normalisation
barneygale Jan 27, 2023
| https://github.com/python/cpython/pull/101560/commits/b428069b063d7641d721f1cf399c086f7e3c9729 |
|
e49e719
Restore str force-casting behaviour; reduce diff a little.
barneygale Feb 4, 2023
| https://github.com/python/cpython/pull/101560/commits/e49e7197c18543f8b71c197b20eda7c1858dd1c2 |
|
a931986
Fix pathlib usage error in importlib
barneygale Feb 4, 2023
| https://github.com/python/cpython/pull/101560/commits/a931986fa440c7d8f30fdd62135983bde2b8925a |
|
38f70bf
Improve initialiser performance.
barneygale Feb 4, 2023
| https://github.com/python/cpython/pull/101560/commits/38f70bf2f785ac37bc970b7789b0f29047144af5 |
|
10844a6
Add NEWS blurb
barneygale Feb 4, 2023
| https://github.com/python/cpython/pull/101560/commits/10844a64085292c249aad7dbc423de6bd35caa30 |
|
d5231b6
Store '_fspath' as non-empty string.
barneygale Feb 4, 2023
| https://github.com/python/cpython/pull/101560/commits/d5231b666939b3edbd97bd79759619462046fb21 |
|
76b2db7
Merge branch 'main' into optimize-pathlib-part-2b
barneygale Mar 6, 2023
| https://github.com/python/cpython/pull/101560/commits/76b2db76bbd17047d19f5e07b5b5639a4cae6a90 |
|
cc2c711
Undo addition of `__init__()` and change to `_from_parsed_parts()`
barneygale Mar 6, 2023
| https://github.com/python/cpython/pull/101560/commits/cc2c7111d73b3b33008fe3d848d99655a249bd76 |
|
cbf0fcd
Fix pickling of paths created via walking.
barneygale Mar 6, 2023
| https://github.com/python/cpython/pull/101560/commits/cbf0fcd2890f3a0ce66bca91b8027d3432212f03 |
|
eb7087f
Simplify patch slightly
barneygale Mar 6, 2023
| https://github.com/python/cpython/pull/101560/commits/eb7087f7a9f44823071559ba363c8cd0579a1981 |
|
3b53e27
Remove unused import
barneygale Mar 11, 2023
| https://github.com/python/cpython/pull/101560/commits/3b53e277b7d4eda2e87f6c51951dd0e6eebd3483 |
|
dec98f2
Merge branch 'main' into optimize-pathlib-part-2b
barneygale Mar 11, 2023
| https://github.com/python/cpython/pull/101560/commits/dec98f2212f9f179d43638f2de2c44b7e644a3c8 |
|
d9a6080
Fix dodgy merge, add comment about _from_parsed_parts()
barneygale Mar 11, 2023
| https://github.com/python/cpython/pull/101560/commits/d9a6080f78c2ffa1e4bc0f6c2d3171c36719c94e |
|
9650dca
Stop returning unnormalised path from `__fspath__()`
barneygale Mar 17, 2023
| https://github.com/python/cpython/pull/101560/commits/9650dca6ee972f8bb53198bfc7860a1e6dc510b0 |
|
af27476
Merge branch 'main' into optimize-pathlib-part-2b
barneygale Mar 17, 2023
| https://github.com/python/cpython/pull/101560/commits/af27476ddfb77d5e62daa0f19dd6e7d5e2c325a6 |
|
97995bd
Undo change to `joinpath()`, fix news blurb.
barneygale Mar 17, 2023
| https://github.com/python/cpython/pull/101560/commits/97995bd2c3ea3c31bb420fab61d55b4ff0332bd0 |
|
Clear filters
| https://github.com/python/cpython/pull/101560/files |
| Please reload this page | https://github.com/python/cpython/pull/101560/files |
| Please reload this page | https://github.com/python/cpython/pull/101560/files |
|
pathlib.py
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
test_pathlib.py
| https://github.com/python/cpython/pull/101560/files#diff-3dd97d2dc8816848d0b0c442e8fdeec9650b3de77935289a93f37ac6396ee17f |
|
2023-02-04-17-47-08.gh-issue-101362.uZjk9-.rst
| https://github.com/python/cpython/pull/101560/files#diff-a346e663030bdcdd209f8c61bfd5720cca64da47b48e814f0127cf14fb5cff30 |
| Lib/pathlib.py | https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
View file
| https://github.com/barneygale/cpython/blob/97995bd2c3ea3c31bb420fab61d55b4ff0332bd0/Lib/pathlib.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/101560/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
|
| https://github.com/python/cpython/pull/101560/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105c |
| Lib/test/test_pathlib.py | https://github.com/python/cpython/pull/101560/files#diff-3dd97d2dc8816848d0b0c442e8fdeec9650b3de77935289a93f37ac6396ee17f |
|
View file
| https://github.com/barneygale/cpython/blob/97995bd2c3ea3c31bb420fab61d55b4ff0332bd0/Lib/test/test_pathlib.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/101560/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/101560/files#diff-3dd97d2dc8816848d0b0c442e8fdeec9650b3de77935289a93f37ac6396ee17f |
|
| https://github.com/python/cpython/pull/101560/files#diff-3dd97d2dc8816848d0b0c442e8fdeec9650b3de77935289a93f37ac6396ee17f |
| Misc/NEWS.d/next/Library/2023-02-04-17-47-08.gh-issue-101362.uZjk9-.rst | https://github.com/python/cpython/pull/101560/files#diff-a346e663030bdcdd209f8c61bfd5720cca64da47b48e814f0127cf14fb5cff30 |
|
View file
| https://github.com/barneygale/cpython/blob/97995bd2c3ea3c31bb420fab61d55b4ff0332bd0/Misc/NEWS.d/next/Library/2023-02-04-17-47-08.gh-issue-101362.uZjk9-.rst |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/101560/{{ revealButtonHref }} |
|
| 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 |