You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added simple module implementing adapters from a low-level resources reader interface to a TraversableResources interface.
Legacy API (path, contents, ...) is now supported entirely by the .files() API with a compatibility shim supplied for resource loaders without that functionality.
I've put together a patch based on python/importlib_resources@3b24bd6307, and interestingly, the tests pass... which is a little concerning because in python/importlib_resources#221 (comment), I describe a compatibility concern that I believe will be present only on the CPython implementation. Before we merge the changes, I'd like to (a) address that concern and (b) ideally write a test that captures that concern.
On further consideration, the concern I had may not be manifest in the implementation. It may be the _adapters.wrap_spec provides all the compatibility that's needed. I'll see if I can concoct an idiomatic case, but I may find that there's no concern at all.
In this comment, I did more analysis and assuaged my own concerns about the implementation. Everything seems to be working as intended, thanks to the strong work by FFY00.
test_importlib.test_read_bytes() is failing for 1 month on AMD64 Windows8.1 Non-Debug 3.x. Please see bpo-45078, the regression may be caused by the commit aaa83cd.
Activity
jaraco commentedon Jul 29, 2021
Importlib_resources 5.1 and 5.2 introduced the following changes (more details at https://importlib-resources.readthedocs.io/en/latest/history.html#v5-2-1):
simplemodule implementing adapters from a low-level resources reader interface to aTraversableResourcesinterface.path,contents, ...) is now supported entirely by the.files()API with a compatibility shim supplied for resource loaders without that functionality.Let's incorporate those into the stdlib version.
jaraco commentedon Jul 29, 2021
I've put together a patch based on python/importlib_resources@3b24bd6307, and interestingly, the tests pass... which is a little concerning because in python/importlib_resources#221 (comment), I describe a compatibility concern that I believe will be present only on the CPython implementation. Before we merge the changes, I'd like to (a) address that concern and (b) ideally write a test that captures that concern.
jaraco commentedon Jul 29, 2021
On further consideration, the concern I had may not be manifest in the implementation. It may be the _adapters.wrap_spec provides all the compatibility that's needed. I'll see if I can concoct an idiomatic case, but I may find that there's no concern at all.
jaraco commentedon Jul 29, 2021
In this comment, I did more analysis and assuaged my own concerns about the implementation. Everything seems to be working as intended, thanks to the strong work by FFY00.
jaraco commentedon Jul 30, 2021
New changeset aaa83cd by Jason R. Coombs in branch 'main':
bpo-44771: Apply changes from importlib_resources 5.2.1 (GH-27436)
aaa83cd
pablogsal commentedon Jul 30, 2021
Seems that PR 27436 has broken several buildbots. For instance:
https://buildbot.python.org/all/#/builders/350/builds/474
Following our buildbot policy, we will sadly need to revert in 24 if is not fixed.
jaraco commentedon Jul 31, 2021
New changeset e63e631 by Jason R. Coombs in branch 'main':
bpo-44771: Sync with importlib_resources 5.2.2, fixing refleak. (bpo-27497)
e63e631
vstinner commentedon Sep 1, 2021
test_importlib.test_read_bytes() is failing for 1 month on AMD64 Windows8.1 Non-Debug 3.x. Please see bpo-45078, the regression may be caused by the commit aaa83cd.
jaraco commentedon Sep 13, 2021
Reported concern can be addressed in the new issue.