-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Conversation
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 |
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.
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
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.
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!
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.
Neat thanks I didn't know about this. Glad to see this in use so fast!
Thanks for reviewing @douglasdavis @jacobtomlinson! |
Following #9388, I remembered that we're using entrypoints in
sizeof
. This PR makes use of our new utility when handlingdask.sizeof
entrypoints.cc @jacobtomlinson