classification
Title: Adopt changes from importlib_resources 5.2
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: jaraco Nosy List: FFY00, jaraco, pablogsal, vstinner
Priority: normal Keywords: patch

Created on 2021-07-29 02:48 by jaraco, last changed 2021-09-13 00:01 by jaraco. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 27436 merged jaraco, 2021-07-29 02:54
PR 27483 closed pablogsal, 2021-07-30 14:38
PR 27484 closed FFY00, 2021-07-30 14:55
PR 27497 merged jaraco, 2021-07-30 20:58
Messages (9)
msg398453 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2021-07-29 02:48
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):

- 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.

Let's incorporate those into the stdlib version.
msg398454 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2021-07-29 03:03
I've put together a patch based on 3b24bd6307">python/importlib_resources@3b24bd6307, and interestingly, the tests pass... which is a little concerning because in https://github.com/python/importlib_resources/pull/221#discussion_r659214483, 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.
msg398455 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2021-07-29 03:14
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.
msg398484 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2021-07-29 12:57
In [this comment](https://github.com/python/importlib_resources/pull/221#discussion_r679124389), 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.
msg398524 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2021-07-30 01:05
New changeset aaa83cdfab6817446285e631232f64b394ac6791 by Jason R. Coombs in branch 'main':
bpo-44771: Apply changes from importlib_resources 5.2.1 (GH-27436)
https://github.com/python/cpython/commit/aaa83cdfab6817446285e631232f64b394ac6791
msg398554 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2021-07-30 14:30
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.
msg398613 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2021-07-31 00:37
New changeset e63e6311aa258a5f3f49a7aed9fdde445fd384d6 by Jason R. Coombs in branch 'main':
bpo-44771: Sync with importlib_resources 5.2.2, fixing refleak. (#27497)
https://github.com/python/cpython/commit/e63e6311aa258a5f3f49a7aed9fdde445fd384d6
msg400851 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-09-01 15:59
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 aaa83cdfab6817446285e631232f64b394ac6791.
msg401677 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2021-09-13 00:01
Reported concern can be addressed in the new issue.
History
Date User Action Args
2021-09-13 00:01:35jaracosetstatus: open -> closed
resolution: fixed
messages: + msg401677

stage: patch review -> resolved
2021-09-01 15:59:31vstinnersetnosy: + vstinner
messages: + msg400851
2021-07-31 00:37:40jaracosetmessages: + msg398613
2021-07-30 20:58:48jaracosetpull_requests: + pull_request26015
2021-07-30 14:55:15FFY00setpull_requests: + pull_request26000
2021-07-30 14:38:17pablogsalsetstage: resolved -> patch review
pull_requests: + pull_request25999
2021-07-30 14:30:14pablogsalsetstatus: closed -> open

nosy: + pablogsal
messages: + msg398554

resolution: fixed -> (no value)
2021-07-30 01:06:29jaracosetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-07-30 01:05:13jaracosetmessages: + msg398524
2021-07-29 12:57:36jaracosetmessages: + msg398484
2021-07-29 03:14:23jaracosetmessages: + msg398455
2021-07-29 03:03:11jaracosetmessages: + msg398454
2021-07-29 02:59:20jaracosetnosy: + FFY00
2021-07-29 02:54:00jaracosetkeywords: + patch
stage: patch review
pull_requests: + pull_request25965
2021-07-29 02:48:53jaracocreate