-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Presence of 'egg-info' metadata directory + use of virtualenv results in duplicate entry points #410
Comments
Actually, no. Looking at this more, I see that
The failures I'm seeing elsewhere are when running tests via |
Okay, as expected I was hitting an existing issue but it wasn't reported as an issue but rather a PR, #377. That PR was abandoned in favor of another fix, #379, which was released in v4.12.0 and backported to 4.11 as part of v4.11.4. I was seeing it on some environments (Ubuntu 20.04) and not others (Fedora 36) because |
Some more info. The reason #379 is relevant is because it fixes the value returned by Regarding how to fix this: it's tricky. I noted above that |
I believe the best fix is to use |
The stdlib importlib.metadata returns duplicate distributions (and entry points) in some circumstances for all python versions up to and including 3.11. python/importlib_metadata#410 (comment) The above issue can create duplicate asdf extensions. This fixes issue asdf-format#1254
The stdlib importlib.metadata returns duplicate distributions (and entry points) in some circumstances for all python versions up to and including 3.11. python/importlib_metadata#410 (comment) The above issue can create duplicate asdf extensions. This fixes issue asdf-format#1254 fix changelog typo
The stdlib importlib.metadata returns duplicate distributions (and entry points) in some circumstances for all python versions up to and including 3.11. python/importlib_metadata#410 (comment) The above issue can create duplicate asdf extensions. This fixes issue asdf-format#1254 fix changelog typo
The stdlib importlib.metadata returns duplicate distributions (and entry points) in some circumstances for all python versions up to and including 3.11. python/importlib_metadata#410 (comment) The above issue can create duplicate asdf extensions. This fixes issue asdf-format#1254 fix changelog typo
I've just found my way here after a Google search for what seems like the same original issue. In my case I'm installing an editable Python package which seems to result in duplicate entry points. However, I'm still seeing this with the 6.0.0 release of |
Can you show us the content of the metadata directory for your package? |
@FFY00 You mean the egg-info directory?
|
The fix is definitely in place. Please do some more investigation on your environment or put together an (ideally minimal) reproducer and open a new issue. Since this issue implicates "virtualenv", double-check the Setuptools version that's present in the virtualenv (or upgrade it). |
@jaraco OK, having dug deeper, my issue is caused by a package I'm requiring not using They seem to be currently specialising syntax based on the version of Python. I'm assuming that if they use this package then that issue also goes away? https://github.com/SystemRDL/PeakRDL/blob/main/src/peakrdl/plugins/entry_points.py |
(I'll preface this by saying that I think this might be similar to #101. It also feels like something that must have been reported elsewhere but my search-fu isn't sufficient to find those previous report(s))
If a
{package}.egg-info
directory exists and you're using a virtualenv, theimportlib_metadata.distributions()
function returns a duplicate distribution. Since this function is used byimportlib_metadata.entry_points()
, you'll also see a duplicate set of entrypoints. For example, consider the following using the simplest package I could find:This returns something like the following:
We're not installing anything in editable mode so I think the distributions are actually the same and the info from
egg-info
should be ignore in favour of the info from thedist-info
directory. I also see attempts to deduplicate the returned entrypoints inimportlib_metadata.entrypoints()
but I haven't dived into why this isn't working (or whether preventing this issue is even the goal of that code).Additional info
The text was updated successfully, but these errors were encountered: