-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Only allow one top-level .dist-info directory in wheels #7494
Merged
chrahunt
merged 4 commits into
pypa:master
from
chrahunt:refactor/wheel-metadata-retrieval
Dec 22, 2019
Merged
Only allow one top-level .dist-info directory in wheels #7494
chrahunt
merged 4 commits into
pypa:master
from
chrahunt:refactor/wheel-metadata-retrieval
Dec 22, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chrahunt
added
type: refactor
Refactoring code
skip news
Does not need a NEWS file entry (eg: trivial changes)
labels
Dec 16, 2019
I think we should:
|
Workaround is described in #7487 (comment). |
Added test here. |
pradyunsg
approved these changes
Dec 21, 2019
pradyunsg
removed
the
skip news
Does not need a NEWS file entry (eg: trivial changes)
label
Dec 21, 2019
chrahunt
force-pushed
the
refactor/wheel-metadata-retrieval
branch
from
December 21, 2019 16:23
9e4d41f
to
76ade1f
Compare
This aligns with the previous behavior that would have enforced the found .dist-info directory starting with the name of the package. We raise UnsupportedWheel because it looks better in output than the AssertionError (which includes traceback).
chrahunt
force-pushed
the
refactor/wheel-metadata-retrieval
branch
from
December 22, 2019 02:28
76ade1f
to
649a4f3
Compare
Thank you both for reviewing! |
jsirois
added a commit
to jsirois/pip
that referenced
this pull request
Dec 27, 2019
It seems pypa#7494 disallows non top-level .dist-info dirs. This appears to not have been intentional. Restore support for wheels with nested (vendored) distributions since they do not pose ambiguity probmens for pip.
jsirois
added a commit
to pex-tool/pip
that referenced
this pull request
Dec 27, 2019
It seems pypa#7494 disallows non top-level .dist-info dirs. This appears to not have been intentional. Restore support for wheels with nested (vendored) distributions since they do not pose ambiguity probmens for pip.
@chrahunt are you aware this PR breaks
|
Thanks, I see the problem - we're not restricting the check to top-level directories. I'll submit a fix shortly. |
lock
bot
added
the
auto-locked
Outdated issues that have been locked by automation
label
Jan 27, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Original justification is in the linked issue. The current improvement is small, but this will be a useful simplification later when refactoring to install directly from wheel files since we can search directly for metadata files by matching on e.g.
^[^/]+\.dist-info/WHEEL$
.For any impacted packages (i.e. intel-tensorflow), a workaround could be to put the non-primary
.dist-info
into*.data/purelib
.Fixes #7487.