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

Switch from entrypoints to importlib.metadata #792

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

s-t-e-v-e-n-k
Copy link

Since the minimum Python version supported now directly supports querying entry points using the standard library, write a wrapper around to support both upstream APIs, and make use of it, rather than the external entrypoints package.

Copy link

codecov bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.32%. Comparing base (cb2eb37) to head (d100d5f).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #792      +/-   ##
==========================================
- Coverage   91.54%   91.32%   -0.23%     
==========================================
  Files          17       17              
  Lines        1621     1636      +15     
==========================================
+ Hits         1484     1494      +10     
- Misses        137      142       +5     

Copy link
Member

@MSeal MSeal left a comment

Choose a reason for hiding this comment

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

The one build failure looks unrelated result of merging master in. I'll take a look later at it to resolve if you don't get it before me. Thanks for posting the improvement!

Since the minimum Python version supported now directly supports
querying entry points using the standard library, write a wrapper around
to support both upstream APIs, and make use of it, rather than the
external entrypoints package.
Since the importlib.metadata entry points API is very simple in 3.8 and
more complete in 3.10+, we need to support both. This function can be
removed when 3.10 is the minimum supported version, and replaced
with entry_points(group=group).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
with entry_points(group=group).
with ``entry_points(group=group)``.

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