Skip to content
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 entry_points utility in sizeof #9390

Merged
merged 2 commits into from
Aug 17, 2022
Merged

Conversation

jrbourbeau
Copy link
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 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
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
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
Member Author

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

Copy link
Member

@jacobtomlinson jacobtomlinson left a comment

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
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.

None yet

3 participants