Title: Possible regression in MultiplexedPath.joinpath in 3.12 · Issue #106614 · python/cpython · GitHub
Open Graph Title: Possible regression in MultiplexedPath.joinpath in 3.12 · Issue #106614 · python/cpython
X Title: Possible regression in MultiplexedPath.joinpath in 3.12 · Issue #106614 · python/cpython
Description: Bug report In Python 3.11, it's possible to use MultiplexedPath.joinpath("") (with an empty argument) and it returns the first path stored in MultiplexedPath._paths, for example: >>> from importlib.resources import files >>> files("jupyt...
Open Graph Description: Bug report In Python 3.11, it's possible to use MultiplexedPath.joinpath("") (with an empty argument) and it returns the first path stored in MultiplexedPath._paths, for example: >>> from importlib...
X Description: Bug report In Python 3.11, it's possible to use MultiplexedPath.joinpath("") (with an empty argument) and it returns the first path stored in MultiplexedPath._paths, for example: >...
Opengraph URL: https://github.com/python/cpython/issues/106614
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Possible regression in MultiplexedPath.joinpath in 3.12","articleBody":"# Bug report\r\n\r\nIn Python 3.11, it's possible to use `MultiplexedPath.joinpath(\"\")` (with an empty argument) and it returns the first path stored in `MultiplexedPath._paths`, for example:\r\n\r\n```\r\n>>> from importlib.resources import files\r\n>>> files(\"jupyterlab_server.test_data\")\r\nMultiplexedPath('/usr/lib/python3.11/site-packages/jupyterlab_server/test_data')\r\n>>> files(\"jupyterlab_server.test_data\").joinpath(\"\")\r\nPosixPath('/usr/lib/python3.11/site-packages/jupyterlab_server/test_data')\r\n```\r\n\r\nBut in Python 3.12, this doesn't work anymore:\r\n\r\n```\r\n>>> from importlib.resources import files\r\n>>> files(\"jupyterlab_server.test_data\")\r\nMultiplexedPath('/usr/lib/python3.12/site-packages/jupyterlab_server/test_data')\r\n>>> files(\"jupyterlab_server.test_data\").joinpath(\".\")\r\nTraceback (most recent call last):\r\n File \"\u003cstdin>\", line 1, in \u003cmodule>\r\n File \"/usr/lib64/python3.12/importlib/resources/readers.py\", line 92, in joinpath\r\n return super().joinpath(*descendants)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/usr/lib64/python3.12/importlib/resources/abc.py\", line 117, in joinpath\r\n target = next(names)\r\n ^^^^^^^^^^^\r\nStopIteration\r\n```\r\n\r\nThe implementation has been changed in: https://github.com/python/cpython/commit/cea910ebf14d1bd9d8bc0c8a5046e69ae8f5be17#diff-2e741d925220d74a9cc04cda1314d3649d9d189c0efc7db18e5387a51225b61c \r\n\r\n# Your environment\r\n\r\nPython 3.12 beta 3 installed from Fedora RPM, Fedora 38, x86_64","author":{"url":"https://github.com/frenzymadness","@type":"Person","name":"frenzymadness"},"datePublished":"2023-07-11T06:04:05Z","url":"https://github.com/python/cpython/issues/106614"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:e5f5b28d-d913-4cc5-8299-6505f9d19902 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DE8A:1DB82B:79FB0:A7C7F:6B004F19 |
| html-safe-nonce | 1f9d79dee4a7b95b7baf8a4e488c2166a7a7fafd9a3c7d9007af1b58badce6e7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERThBOjFEQjgyQjo3OUZCMDpBN0M3Rjo2QjAwNEYxOSIsInZpc2l0b3JfaWQiOiI3MDExMjUxNTYyNzczNDE5NzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3cac56a40486dc97e776101ecbdba8fe25441424f2bf8fecc853a67946261789 |
| hovercard-subject-tag | issue:1798171939 |
| 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/106614/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0f44d1c9f92c3bd4690c38abb2f136f026afc7b6019b4f25e64a6073c82cac8a/python/cpython/issues/106614 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0f44d1c9f92c3bd4690c38abb2f136f026afc7b6019b4f25e64a6073c82cac8a/python/cpython/issues/106614 |
| og:image:alt | Bug report In Python 3.11, it's possible to use MultiplexedPath.joinpath("") (with an empty argument) and it returns the first path stored in MultiplexedPath._paths, for example: >>> from importlib... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | frenzymadness |
| hostname | github.com |
| expected-hostname | github.com |
| None | f9517bf360d46638a1e5e7daee7158842fe5ef43c9000afa0e127564a7c2f39b |
| 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 | b27c5dde30676028abd5c5fc53ce5c9b625f8281 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width