Title: zipfile.Path is not Path-like · Issue #99818 · python/cpython · GitHub
Open Graph Title: zipfile.Path is not Path-like · Issue #99818 · python/cpython
X Title: zipfile.Path is not Path-like · Issue #99818 · python/cpython
Description: This is about zipfile.Path. The doc says it is compatible to pathlib.Path. But it seems that is not for 100% because it doesn't derive from pathlib.PurePath and can treated as Path-like in all situations. I was redirected from pandas whe...
Open Graph Description: This is about zipfile.Path. The doc says it is compatible to pathlib.Path. But it seems that is not for 100% because it doesn't derive from pathlib.PurePath and can treated as Path-like in all situ...
X Description: This is about zipfile.Path. The doc says it is compatible to pathlib.Path. But it seems that is not for 100% because it doesn't derive from pathlib.PurePath and can treated as Path-like in all ...
Opengraph URL: https://github.com/python/cpython/issues/99818
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"zipfile.Path is not Path-like","articleBody":"This is about [`zipfile.Path`](https://github.com/python/cpython/blob/8bb7fdaee8c19f0311f15dbea7f8eee80a67a50f/Lib/zipfile.py#L2290). The doc says it is compatible to `pathlib.Path`. But it seems that is not for 100% because it doesn't derive from `pathlib.PurePath` and can treated as _Path-like_ in all situations.\r\n\r\nI was redirected from `pandas` where I opened an [issue](https://github.com/pandas-dev/pandas/issues/49906) about the fact that `pandas.read_excel()` does accept path-like objects but not `zipfile.Path`. It was [explained to me](https://github.com/pandas-dev/pandas/issues/49906#issuecomment-1328072136) that `zipfile.Path` doesn't implement `__fspath__` and that is the problem.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-101589\n* gh-102266\n* gh-102267\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/buhtz","@type":"Person","name":"buhtz"},"datePublished":"2022-11-27T11:17:36.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":16},"url":"https://github.com/99818/cpython/issues/99818"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a2ecc296-d86a-7452-acb5-2a897f248045 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B016:38BF1A:7FD2D0:ABB3A1:6969795C |
| html-safe-nonce | c49b5b2a7ee0cef4a6ec2ad1f0fea8e0d5e03c7fee174c94e1cfffb92f804ceb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDE2OjM4QkYxQTo3RkQyRDA6QUJCM0ExOjY5Njk3OTVDIiwidmlzaXRvcl9pZCI6IjI5Mjc5ODc0NTM1MTI0ODExMTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8c629513d9b29e25264e0e341b96d5640a7af5f8c9e6ed4278c35e8b29e9ee28 |
| hovercard-subject-tag | issue:1465408176 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python/cpython/99818/issue_layout |
| twitter:image | https://opengraph.githubassets.com/43277e88d269d955297453758d9a40a92cb5f1fbd2845ec5cc6f777f0ab61755/python/cpython/issues/99818 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/43277e88d269d955297453758d9a40a92cb5f1fbd2845ec5cc6f777f0ab61755/python/cpython/issues/99818 |
| og:image:alt | This is about zipfile.Path. The doc says it is compatible to pathlib.Path. But it seems that is not for 100% because it doesn't derive from pathlib.PurePath and can treated as Path-like in all situ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | buhtz |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6f193beb8ff08443adc07685d75302ab8aaf0a135f6e251c3ff3112c8deb881 |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 212e3e3d3298bf5b313830edfd2399e869f7ea76 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width