Add entry_points compatibility utility#9388
Merged
jrbourbeau merged 2 commits intodask:mainfrom Aug 17, 2022
Merged
Conversation
jsignell
approved these changes
Aug 17, 2022
Member
jsignell
left a comment
There was a problem hiding this comment.
This seems reasonable to me! I just wonder if if belongs in dask/compatibility.py rather than dask/utils.py
Member
Author
|
Yes totally should, moved :) |
jrbourbeau
approved these changes
Aug 17, 2022
Member
jrbourbeau
left a comment
There was a problem hiding this comment.
Thanks @jacobtomlinson!
Noting that the gpuCI failure
09:49:43 E MemoryError: Parquet data was larger than the available GPU memory!
09:49:43 E
09:49:43 E See the notes on split_row_groups in the read_parquet documentation.
09:49:43 E
09:49:43 E Original Error: std::bad_alloc
09:49:43
09:49:43 /opt/conda/envs/dask/lib/python3.9/site-packages/dask_cudf/io/parquet.py:265: MemoryError
is unrelated to the changes here
entry_points compatibility utility
This was referenced Aug 17, 2022
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.
In #9283 @douglasdavis is using
importlib.metadata.entry_pointsrather thanpkg_resources.iter_entry_pointsbecausepkg_resourcesis part ofsetuptoolsand cannot be guaranteed to be installed.importlib.metadatais in the standard library and can be relied on.However
importlib.metadata.entry_pointschanged a bunch in 3.10 so some compatibility code is needed to support 3.8/3.9.Given that entrypoints are not only used in #9283 but also in
dask-ctland potentially in dask/dask-kubernetes#532 I thought it makes sense to put one compatibility utility intodask/daskfor reuse in other places.