-
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
Allow and warn on RECORD lines with more than three elements #6191
Conversation
eb6629e
to
7f25059
Compare
I'd prefer that instead of using row[0], row[1], row[2] we use ",".join(row[:-2]), row[-2], row[-1]. That way, it'll result in a valid RECORD for the case where we're failing. It's better than printing a broken RECORD. |
The reason I did it that way is because that's how it was before (link to the change): pip/src/pip/_internal/wheel.py Lines 534 to 543 in fc62b5b
It seems like restoring to the original code is safest and less likely to introduce new problems. Right now, pip just ignores elements beyond the third one. One problem with
would become the following, which seems worse:
We don't know how many cases there are like this in the wild, so there's a chance it could create a bigger or at least different problem. It doesn't seem like a hotfix is the best time to experiment with fixing this other problem. Releasing with the warning should give us a better sense of the types of invalid RECORD files that are out there and so in a better position to revisit it. |
Fair enough. :) |
Okay, thanks a lot, @pradyunsg. Let's remember to perhaps create a new issue regarding how to handle invalid RECORD lines like this (if there isn't already an issue). (It's a somewhat similar discussion to #5913, regarding a different way in which RECORD files can be problematic.) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This fixes #6165.