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 almost 7 years ago. Updated almost 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
Actions #1

Updated by ttereshc almost 7 years ago

  • Triaged changed from No to Yes
Actions #2

Updated by daviddavis almost 7 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.

Actions #3

Updated by bmbouter almost 7 years ago

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

Actions #4

Updated by Anonymous about 6 years ago

Actions #5

Updated by bmbouter almost 5 years 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.

Actions #6

Updated by bmbouter almost 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF