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 (762313b).
Report is 13 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!

papermill/utils.py Outdated Show resolved Hide resolved
@s-t-e-v-e-n-k
Copy link
Author

@Borda I've corrected the docstring you've pointed out (sorry it took me so long!)

@@ -20,6 +20,9 @@ include *.toml

include .bumpversion.cfg

include papermill/tests/fixtures/foo-0.0.1.dist-info/METADATA
Copy link
Member

Choose a reason for hiding this comment

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

This looks strange to be included, is it testing artifact?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it's a testing file -- we provide just enough wheel metadata in that path to give us one entry point.

Copy link
Author

Choose a reason for hiding this comment

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

@Borda any opinion on this?

Copy link
Member

Choose a reason for hiding this comment

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

I think that test shall not be distributed, so for testing you can install it with -e so if shall see all local files too

@frenzymadness
Copy link

I'm looking forward to it as it allows me to drop the entrypoints package from Fedora Linux. Is there any plan to merge and release this?

@frenzymadness
Copy link

You might want to remove entrypoints also from the requirements/docs.txt file:

entrypoints

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

4 participants