-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Stop recognizing files ending with .dist-info as dist #2075
Conversation
As proposed in PEP 376, dist-info distributions must be directories.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm uneasy just dropping support for this usage. Presumably someone created it with a purpose. Even the pep makes a nod to backward compatibility, basically not addressing the issue and hoping to create a new tool that's not limited by the behavior.
If Setuptools is to drop support for these files, we should know why those were created and how a user whose environment has those files needs to react.
It's building for me locally and on CI, so probably the issue is in your environment or due to your patch. It may be that when you switched to master, you still had a corrupted environment, so you may want to |
Could you please give me some me some context about the mentioned backward compatibility? I am too young to be familiar with none of the name listed in that section in the PEP.
This is to solve the linked
Since this was to fix Thanks for the tips about the tests BTW, I'm feeling so dumb now 😄 should have figured that out earlier. Edit: converted to draft because I have yet to be able to debug this. |
If the only reason these dist-info files exists is because of Dockerfile whiteout files, then yeah, setuptools/pkg_resources should just ignore them. |
In this latest push, I've found the issue - the issue was that a filename was being passed ("setuptools-4XXX.dist-info") that did not exist. Therefore, As you can see, this code is really hairy. I'm still not confident this approach is the right one. I think more investigation is warranted into why |
In this latest commit, I investigated further and now understand why 'isdir' wasn't working as a test - it wasn't including the full path to the entry, and now including that detail, the 'isdir' test works as you had intended. |
Thanks for providing the insight! |
Summary of changes
As proposed in PEP 376, dist-info distributions must be directories.
Closes pypa/pip#8122.
Pull Request Checklist
changelog.d
Edit: apparently files with
dist-info
extension seems to be an supported behavior forsetuptools
. I'll try to investigate why.