packages with non-canonical but valid names cannot be installed with pip >= 8.1.2
Create a repo with a package that is non-canonical. The normalized name is defined in PEP 503: "The name should be lowercased with all runs of the characters . , - , or _ replaced with a single - character. "
$ pulp-admin python repo create --repo-id name-test --feed https://pypi.python.org --package-names zope.interface
pip will not be able to install as expected:
$ pip install -i http://dev.example.com/pulp/python/web/name-test/simple/ zope.interface Could not find a version that satisfies the requirement zope.interface (from versions: ) No matching distribution found for zope.interface
pip is requesting this url:
We are serving this url:
The solution is not just to normalize the name before publish. Older versions of pip request the url we currently serve, so to maintain compatibility with legacy clients, we should serve both the normalized and unnormalized names, as PyPI does.
#2 Updated by daviddavis over 3 years ago
One thing worth noting is that pypi prevents the registration of packages that would have conflicting hyphenated names. For example, since https://pypi.python.org/pypi/zope.interface exists, I can't register zope_interface:
Registering zope_interface to https://pypi.python.org/pypi Server response (403): Package name conflicts with existing package 'zope.interface'
We may need something in pulp to prevent this as well.
#5 Updated by bmbouter over 1 year ago
- Status changed from NEW to CLOSED - WONTFIX
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.
Please register to edit this issue