Skip to content

Add entry_points compatibility utility#9388

Merged
jrbourbeau merged 2 commits intodask:mainfrom
jacobtomlinson:entrypoints
Aug 17, 2022
Merged

Add entry_points compatibility utility#9388
jrbourbeau merged 2 commits intodask:mainfrom
jacobtomlinson:entrypoints

Conversation

@jacobtomlinson
Copy link
Member

In #9283 @douglasdavis is using importlib.metadata.entry_points rather than pkg_resources.iter_entry_points because pkg_resources is part of setuptools and cannot be guaranteed to be installed. importlib.metadata is in the standard library and can be relied on.

However importlib.metadata.entry_points changed 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-ctl and potentially in dask/dask-kubernetes#532 I thought it makes sense to put one compatibility utility into dask/dask for reuse in other places.

Copy link
Member

@jsignell jsignell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable to me! I just wonder if if belongs in dask/compatibility.py rather than dask/utils.py

@jacobtomlinson
Copy link
Member Author

Yes totally should, moved :)

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@jrbourbeau jrbourbeau changed the title Add entry_points compatibility utility Add entry_points compatibility utility Aug 17, 2022
@jrbourbeau jrbourbeau merged commit a9ee6c2 into dask:main Aug 17, 2022
@jacobtomlinson jacobtomlinson deleted the entrypoints branch August 17, 2022 16:49
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.

3 participants