Title: [3.9] bpo-40924: Remove protocol for supplying Traversable objects from loaders by jaraco · Pull Request #20820 · python/cpython · GitHub
Open Graph Title: [3.9] bpo-40924: Remove protocol for supplying Traversable objects from loaders by jaraco · Pull Request #20820 · python/cpython
X Title: [3.9] bpo-40924: Remove protocol for supplying Traversable objects from loaders by jaraco · Pull Request #20820 · python/cpython
Description: As discovered in this comment, the protocol for soliciting a files() method on loaders is inadequate as some loaders do not have the context about the package with which they're associated, and although GH-20576 (and importlib_resources 2.x) attempted to address this concern while continuing to supply native support on ResourceReaders, it also brought unintended consequences, reported in bpo-40924. This change selectively removes that behavior to avoid tempting custom loader implementers from implementing this protocol. A different fix should be applied in master. https://bugs.python.org/issue40924
Open Graph Description: As discovered in this comment, the protocol for soliciting a files() method on loaders is inadequate as some loaders do not have the context about the package with which they're associated, and...
X Description: As discovered in this comment, the protocol for soliciting a files() method on loaders is inadequate as some loaders do not have the context about the package with which they're associated,...
Opengraph URL: https://github.com/python/cpython/pull/20820
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:9112c932-49f6-3c67-3a0a-5d61f1d756fa |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A4A2:6456C:117EC2F:181BE5E:6A4DDB13 |
| html-safe-nonce | 6d68feb42fdb4aebe06778d291f840277b9b5f0e9781dc9bf7a7b969b153fc21 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEEyOjY0NTZDOjExN0VDMkY6MTgxQkU1RTo2QTREREIxMyIsInZpc2l0b3JfaWQiOiI3NjY2NDc3OTE4ODk4MjE1Njk5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 506ecbf9d9a83ad84a3e079b2f9e3625a17d4cd170dc890c8b4709b7c84a2286 |
| hovercard-subject-tag | pull_request:433384847 |
| 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 | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/20820/files |
| twitter:image | https://avatars.githubusercontent.com/u/308610?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/308610?s=400&v=4 |
| og:image:alt | As discovered in this comment, the protocol for soliciting a files() method on loaders is inadequate as some loaders do not have the context about the package with which they're associated, and... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| 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 | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width