Project

Profile

Help

Issue #2692

closed

packages with non-canonical but valid names cannot be installed with pip >= 8.1.2

Added by amacdona@redhat.com about 7 years ago. Updated about 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Python:
Platform Release:
Target Release - Python:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

To reproduce:

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:
http://dev.example.com/pulp/python/web/name-test/simple/zope-interface/

We are serving this url:
http://dev.example.com/pulp/python/web/name-test/simple/zope.interface/

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.


Files

pulp.png (9.83 KB) pulp.png Anonymous, 01/17/2018 10:14 PM

Also available in: Atom PDF