-
Notifications
You must be signed in to change notification settings - Fork 251
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
Use importlib.resources
to load schema and licenses
#670
Use importlib.resources
to load schema and licenses
#670
Conversation
0154685
to
dffbecb
Compare
10e6a79
to
aa56dca
Compare
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.
my overall feeling is that this is a lot of code to be vendoring for a rather niche use case - poetry in a zipapp - which, presumably, has been unsupported for all this time anyway.
Maybe wait until python 3.8 goes eol next year and then come back to this?
vendors/pyproject.toml
Outdated
@@ -22,6 +22,7 @@ classifiers = [ | |||
python = "^3.8" | |||
|
|||
fastjsonschema = "^2.18.0" | |||
importlib-resources = { version = ">=1.3", python = "<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.
<3.9
is not helpful here: importlib-resources has to be either vendored with poetry-core, or not.
This is a decision that is made at make vendor/update
time: it is not desirable that maintainers and contributors using different python versions get different answers
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've removed the vendored code per #670 (comment)
I'd like to avoid additional vendoring, too. An alternative to waiting for the EOL of Python 3.8 might be to keep the old way for Python 3.8 and only use |
That makes sense to me 👍 |
* Removed `importlib_resources` and `zipp` vendored code * Continue using `__file__` in Python 3.8 * Only use `importlib.resources` in Python >= 3.9
e828e07
to
cebcdd3
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@radoering @dimbleby this is ready for another review 🙂 |
Again, this is one step towards resolving python-poetry/poetry#2965.
Another attempt after #668 fell through.