Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for resources in namespace packages #196

Merged
merged 3 commits into from
Oct 23, 2020

Conversation

FFY00
Copy link
Member

@FFY00 FFY00 commented Oct 23, 2020

Fixes #68

Signed-off-by: Filipe Laíns <lains@archlinux.org>
That is changing, we want to add support for resources in namespace
packages.

Signed-off-by: Filipe Laíns <lains@archlinux.org>
Signed-off-by: Filipe Laíns <lains@archlinux.org>
@anthrotype
Copy link

anthrotype commented Nov 25, 2020

I don't know how the this project exactly relates to the built-in importlib.resources (I see in the README that you recommend to use the buillt-in module for Python >= 3.9), but I wonder: does the built-in importlib.resources in Python 3.9 also supports namespace packages? Or do I need to use this importlib_resources "backport" to get this feature even on Python 3.9? (which would make the backport more advanced the the real thing). Thanks

@jaraco
Copy link
Member

jaraco commented Nov 27, 2020

This project and importlib.resources are synchronized. Commits here are ported to CPython and vice-versa. The namespace package support was only recently added and hasn't yet been ported to CPython, so if you want to support namespace packages, you'll want to rely on importlib_resources on CPython 3.9 or earlier. Most likely, the namespace package support will land in Python 3.10.

@anthrotype
Copy link

Makes sense, thank you for the clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to retrieve resources from a namespace package
3 participants