Project

Profile

Help

Issue #2692

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

Added by amacdona@redhat.com over 3 years ago. Updated over 1 year 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.

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

History

#1 Updated by ttereshc over 3 years ago

  • Triaged changed from No to Yes

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

#3 Updated by bmbouter over 3 years ago

We should have a separate issue (or maybe feature) to track the gap between PyPI and Pulp's functionality in Comment 2.

#4 Updated by Anonymous almost 3 years ago

250

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

#6 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF