-
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
Prevent the use of PIP_NO_USE_PEP517 to head off user confusion #6134
Conversation
120b6c7
to
ef10095
Compare
Could you add a release blocker label to this? (on my mobile) |
Done! |
ef10095
to
6601b59
Compare
By the way, the unit tests I added reveal that pip/src/pip/_internal/pyproject.py Line 63 in 47d7f2b
And here: pip/src/pip/_internal/pyproject.py Line 70 in 47d7f2b
I don't know if there are other places that the code distinguishes between 0 and |
If the |
Pinging @pfmoore for comments on this. :) |
I'll try to get some time to review, but I'm super busy at the moment, so it may be a while. Please don't hold the release on the basis of waiting for me to have free time. Sorry! (I agree with @cjerdonek that it would be nice for this to go in alongside the PEP 517 change, though). |
Roger that! I'll try to do a review on this myself, later this week. |
6601b59
to
5fe3157
Compare
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.
LGTM.
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 PR is a follow-up to PR #5743 (the PEP 517 PR). I'm hoping it can be merged in the same release that PEP 517 goes out since for backwards compatibility reasons we might not be able to merge it afterwards.
This PR addresses an issue I raised with that PR and discussed with @pfmoore in that issue. He and I agreed I would take care of it: #5743 (comment)
Basically, the change is to prevent from happening with the new
--no-use-pep517
option a confusion that happened in the past with certain other "no" options (like--no-cache-dir
): #5735Namely, without this PR, someone can pass
PIP_NO_USE_PEP517=true
, and it will result inoptions.use_pep517
beingTrue
instead ofFalse
, which is what one would logically expect.This PR prevents this by not allowing the environment variable
PIP_NO_USE_PEP517
to be used. Instead, it instructs the user to use an appropriate value forPIP_USE_PEP517
. Here is what the output looks like:The PR also improves handling of the corresponding
--no-cache-dir
scenario by raising a parser error instead of aValueError
, since I noticed that while implementing this PR. This results in a better error message display. Instead of aValueError
stack trace, the user will get this:After this PR, it shouldn't be too hard also to address @pradyunsg's suggestions that he made here:
#5743 (comment)
since this PR sets up the option callback and tests, etc, needed for his suggestion.