-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Support the importlib.resources files API in rewritten files #9173
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
Conversation
Signed-off-by: Bernát Gábor <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems reasonable 👍
Signed-off-by: Bernát Gábor <[email protected]>
Signed-off-by: Bernát Gábor <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Bernát Gábor <[email protected]>
I believe this may also fix #9174 |
Thanks @gaborbernat! |
@@ -276,6 +276,14 @@ def get_data(self, pathname: Union[str, bytes]) -> bytes: | |||
with open(pathname, "rb") as f: | |||
return f.read() | |||
|
|||
if sys.version_info >= (3, 9): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Users of Python 3.8 and earlier can also get the files
support by using importlib_resources
backport. Are you okay with this functionality not being supported in those environments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm personally fine with that 😊
Hello. Is there a release timeline including this fix? Thanks! |
you can try it out in 7.0.0rc1 -- it will eventually land in 7.0 proper |
Resolves #9169