-
Notifications
You must be signed in to change notification settings - Fork 415
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
[Windows] Unable to inject jaraco.clipboard #528
Comments
I worked around the issue by running |
I recall dealing with this bug in pip. setuptools normalises package names differently from PEP 503, specifically it does not replace dots with dashes, which likely is the cause. We should probably switch to importlib-metadata instead. |
This is due to It's really unfortunate that there are multiple ways to normalize package names. |
So this is confusing me. PEP503 says
But PEP426 which it "references" only talks about dashes and underscores being equivalent, not periods:
So does this mean that package names can be different by replacing a ??? |
The reference of PEP 426 in PEP 503 is about valid characters in a package name; PEP 503 is the only active PEP that defines package name normalisation. Also note that PEP 426 was withdrawn, so any definition in it is not enforcing anyway.
There is really only one way to do it: PEP 503. setuptools’s implementation predates the specification, and they did not change the behaviour to match the PEP (likely for legacy reasons). |
So are you suggesting that we should match setuptool's implementation of normalized names, despite the fact that it is "wrong", in the sense that it is not in compliance with PEP503? |
BTW, I hope these comments don't sound irate, I am just trying to make sense of all of this with a healthy dose of humor. 🙂 |
No, the other way around, we should either not use, or work around setuptools’s implementation to match the standard. |
The problem right now is we’re using setuptools’s pip uses a lower-level construct, Alternatively, Python 3.8+ includes |
Ah! OK. I see the problem is in |
So for python < 3.8 we'd have to install the backport |
I think I have a I just started with @jaraco 's #344 and made a few changes. I think it works really well. I'm doing a lot of metadata debugging to make sure it's giving proper metadata, and it looks good. I'll probably wait to make it the only change in a pipx version since it's such a core part of pipx. |
Sigh, well while the new
|
|
@uranusjr, interestingly, if I am reading the pip code correctly I guess we can do that too, perhaps as a backup if we get a |
Huh. I read the implementation, and it seems like Some more context. PEP 376 says the Edit: I raised this issue to the PyPA. cc @jaraco Footnotes |
@jaraco, I just noticed that |
When you say entry points, I assume you mean But you should also note that the reported failure is when attempting to inject |
Right, I understand about the injection. I was just looking for a testcase to make sure the metadata inspector is both not failing with an error AND getting all the pipx-pertinent metadata. Thanks for the package name. |
An update on this, it's not forgotten! Still finalizing my new |
Describe the bug
Today I'm upgrading my Python 3.8 envs with Python 3.9.
reinstall-all
failed (found executables missing), so I uninstalled manually and attempted to reinstall. Afterpipx install 'xonsh[ptk]'
, I attempted to inject two deps:With
--verbose
:Expected behavior
The package should have installed correctly.
It looks like the problem is the
manglingnormalization of the name. The package name isjaraco.clipboard
notjaraco-clipboard
:The text was updated successfully, but these errors were encountered: