Jason R. Coombs <jar...@jaraco.com> added the comment:
In [this commit](https://github.com/python/importlib_resources/commit/bd20d893f11f387d285c666bc99fd2d4a7c33ef8), I've reconciled and merged the changes from importlib_resources 3.2-5.0, mainly the namespace package support (https://importlib-resources.readthedocs.io/en/latest/history.html#v5-0-0). Applying these changes to cpython and running the tests, there appear to be two emergent failure modes: ``` cpython master $ http --follow https://github.com/python/importlib_resources/archive/cpython.zip | bsdtar --strip-components 1 -x $ ./python.exe Tools/scripts/run_tests.py test.test_importlib 2>&1 | gist -Pc https://gist.github.com/dde7d5a951d92726380dced21503f843 ``` In my estimation, the first two failures are due to the change in the abc.ResourceReader for contents to raise FileNotFoundError. And the latter failures are seemingly due to the built-in NamespaceLoader not having a resource reader. I suspect the fix here is to add a .get_resource_reader() method to _NamespaceLoader to return a NamespaceReader. (hint: when updating _bootstrap_external.py, you'll need to run `make regen-importlib` or `make regen-all` and recompile). Filipe, would you be interested in exploring these issues and propose some fixes and prepare the PR that applies the changes to CPython? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42129> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com