Load JSON using importlib.resources - #2351
Open
efokschaner wants to merge 2 commits into
Open
Conversation
This is a updated fix for pyupio#2308 and supersedes pyupio#2309 It uses importlib.resources which means dropping support for python 3.6 and below
|
Sure, there's that, as well as pkgutil.get_data which has a longer history of being in |
Author
|
@yeisonvargasf would you happen to be the right person with whom to discuss how to get this fix merged? I'd appreciate your input. |
yeisonvargasf
self-requested a review
March 23, 2022 01:21
Member
|
Hi @efokschaner! Thanks for this PR, in PyUp we decided to support 3.6+ in our tools. This change requires 3.7, I would merge it as soon as possible if this removes the 3.7 requirement. Thank you again for your work! |
Author
|
Thanks @yeisonvargasf , I'll take a look at the approach that supports 3.6 then! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a updated fix for #2308 and supersedes #2309
It uses importlib.resources which means dropping support for python 3.6 and below.
I tested using the following commands:
I also confirmed the un-packaged dir still works as well: