Skip to content

a "name1" requirement can be fulfilled by a project called "name1-name2" (for sdists) #1217

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

Closed
qwcode opened this issue Oct 2, 2013 · 1 comment
Labels
auto-locked Outdated issues that have been locked by automation C: dependency resolution About choosing which dependencies to install type: bug A confirmed bug or unintended behavior

Comments

@qwcode
Copy link
Contributor

qwcode commented Oct 2, 2013

Our requirement matching routine in the finder now tries to get away with not determining the project name, and matching the whole filename (parsed from the pypi url) with <requirement>-. The problem is that a name1-name2 archive url can fulfill a name1 requirement.

This shortcoming has come up before in other issues (#804 (comment))

the code: https://github.com/pypa/pip/blob/1.4.1/pip/index.py#L547

see: #1192 (comment), for when this was discovered in the context of a wheel sorting bug, and a discussion on using distlib.util.split_filename to fix this.

there was a discussion on distutils-sig as well about this: https://mail.python.org/pipermail/distutils-sig/2013-September/022785.html

@qwcode qwcode mentioned this issue Oct 2, 2013
@dstufft
Copy link
Member

dstufft commented Mar 22, 2017

Closing this, this is a valid concern, however short of changing the way sdist names are formatted to be similar to wheel (escaping - to _ in names and versions) there's not much we can do about this. In any case, fixing it would require at least discussion on distutils-sig if not a PEP.

@dstufft dstufft closed this as completed Mar 22, 2017
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: dependency resolution About choosing which dependencies to install type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants