Skip to content

Use entry_points utility in sizeof - #9390

Merged
jrbourbeau merged 2 commits into
dask:mainfrom
jrbourbeau:use-ep-utility
Aug 17, 2022
Merged

jrbourbeau merged 2 commits into
dask:mainfrom
jrbourbeau:use-ep-utility

Conversation

@jrbourbeau

Copy link
Copy Markdown
Member

Following #9388, I remembered that we're using entrypoints in sizeof. This PR makes use of our new utility when handling dask.sizeof entrypoints.

cc @jacobtomlinson

Comment thread dask/compatibility.py
Comment on lines +18 to +24
if _PY_VERSION >= parse_version("3.10"):
return importlib.metadata.entry_points(group=group)
else:
eps = importlib.metadata.entry_points()
if group:
return eps.get(group, [])
return eps
return eps

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is purely just moving code around to we can use _PY_VERSION instead of a try/except, not a functional change. IMO this makes it a bit easier to see when this can be removed as we'll grep for _PY_VERSION when adding/removing Python versions. Just personal preference -- happy to discard this change if others feel strongly

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this makes it a bit easier to see when this can be removed as we'll grep for _PY_VERSION when adding/removing Python versions

makes sense to me!

@jrbourbeau

Copy link
Copy Markdown
Member Author

Noting the failures here are unrelated #8795, #9391 to the changes in this PR

@jacobtomlinson jacobtomlinson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Neat thanks I didn't know about this. Glad to see this in use so fast!

@jrbourbeau

Copy link
Copy Markdown
Member Author

Thanks for reviewing @douglasdavis @jacobtomlinson!

@jrbourbeau
jrbourbeau merged commit c1bc90a into dask:main Aug 17, 2022
@jrbourbeau
jrbourbeau deleted the use-ep-utility branch August 17, 2022 17:56
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