Title: GH-89812: Add `pathlib._PathBase` by barneygale · Pull Request #106337 · python/cpython · GitHub
Open Graph Title: GH-89812: Add `pathlib._PathBase` by barneygale · Pull Request #106337 · python/cpython
X Title: GH-89812: Add `pathlib._PathBase` by barneygale · Pull Request #106337 · python/cpython
Description: Add private pathlib._PathBase class. This will be used by an experimental PyPI package to incubate a tarfile.TarPath class. Implementation notes In pathlib.py: Split Path into _PathBase and Path Implement _PathBase.is_junction() and is_mount() using stat(). In the latter case, restore the implementation deleted in #31458 Implement _PathBase.resolve() using absolute() and readlink() Implement _PathBase._scandir() using iterdir() In test_pathlib.py: Add PathBaseTest to exercise the _PathBase class directly Split PathTest into DummyPathTest and PathTest. The former exercises a representative subclass of _PathBase. Add DummyPathWithSymlinksTest to exercise a similar subclass, this time with symlink support. Questionable bits In pathlib.py, the _PathBase.is_junction() and _PathBase.resolve() methods are new code. The latter is very performance-sensitive and may need more work. Future work Make pathlib._PathBase public. There's still at least a couple of things to do first: Make PurePath._flavour public Figure out what to do with _PathBase.__hash__(), __eq__(), and other comparison methods. Issue: gh-89812
Open Graph Description: Add private pathlib._PathBase class. This will be used by an experimental PyPI package to incubate a tarfile.TarPath class. Implementation notes In pathlib.py: Split Path into _PathBase and Path I...
X Description: Add private pathlib._PathBase class. This will be used by an experimental PyPI package to incubate a tarfile.TarPath class. Implementation notes In pathlib.py: Split Path into _PathBase and Path I...
Opengraph URL: https://github.com/python/cpython/pull/106337
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:b2ef3f9e-0d12-ce64-3a5c-313ba459b226 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 8708:9F506:15203E1:1C47557:6969B664 |
| html-safe-nonce | 65586e6a1a03e50ed3233c151c8364d3da33b88f6fde395f72551034c4074c46 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzA4OjlGNTA2OjE1MjAzRTE6MUM0NzU1Nzo2OTY5QjY2NCIsInZpc2l0b3JfaWQiOiI1NDAxMjEwMTY1Nzk0NTUxMzk2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1ad82a5aa40a23c6a7186b2820017991e7741ac8d8dcb77f904d784460cb59cb |
| hovercard-subject-tag | pull_request:1416831341 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/106337/checks |
| 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 | Add private pathlib._PathBase class. This will be used by an experimental PyPI package to incubate a tarfile.TarPath class. Implementation notes In pathlib.py: Split Path into _PathBase and Path I... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | acedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056 |
| turbo-cache-control | no-preview |
| 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 full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 83c08c21cdda978090dc44364b71aa5bc6dcea79 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width