-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Allow "true" values for pip.conf negative options (no-cache-dir and no-compile) #5011
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
Comments
I think it'll be better to put in effort to switch to a better format for the configuration -- #3809. That said, if someone puts up a PR for this, I'll be happy to review it. :) |
I've labelled this issue as an "deferred PR". This label is essentially for indicating that further discussion related to this issue should be deferred until someone comes around to make a PR. This does not mean that the said PR would be accepted - it has not been determined whether this is a useful change to pip and that decision has been deferred until the PR is made. |
#7735 is a PR attempting to fix this. |
FWIW, I do think we should fix this -- sharp edges that cut me in a PC case aren't fun when I'm working with it, and even though I'll learn to avoid those edges; it doesn't mean I don't have to consider them when working in the same PC case later. But, as @pfmoore noted in #7736, the main concerns here are:
To minimize implementation complexity, I think all the special handling should be done in a post-processing step, as a new self-contained method added to ConfigOptionParser, that is called just before returning in I think we may be able to make the transition work, with the new
|
Thinking about this a bit more, it actually makes more sense to fix this as part of a broader transition (eg: to new configuration file format, new option parsing mechanism etc), since that transition would also follow a similar (if not the same) "transition plan", with additional benefits for both users and maintainers. |
+1 IMO changes in this area will be sufficiently disruptive (they directly affect user's experience with pip) that we should do as much as we can in one single change. As a result, I take the view that we should treat this as an unfortunate wart with our optparse-based command line handling (which we know we want to change at some point) and fix it at the same time as we switch away from that implementation. |
It seems some (as yet unknown) nvidia AI tools are setting the no-cache-dir option globally, effectively disabling caching for everyone on a system. Since it's done silently by installing some tools, it's difficult to detect. When an attempt is made to fix caching locally, it is not possible due to this bug. Is it possible to add some mechanism to remove an option rather than setting its value? For example a new 'undefined' option for true/false options which removes the argument completely from the option parser. It seems unlikely that a new config file format is going to be rolled out since it's been the status since 2020... The current workaround is to audit pip caching semi-regularly, and if it is suddenly disabled then Clearly this is a problem with the tool installers which are so rudely altering the global config, but some workaround for local environments would be a real blessing. |
@twhittock-disguise We do have Also... FYI @warsaw who might want to know about this friction around Python packaging on their stuff. |
Uh oh!
There was an error while loading. Please reload this page.
Description:
Trying to disable cache dir, I see in the docs that I need to set falsy values to
no-cache-dir
, which is counter intuitive: no-cache-dir is false, it's a double negation, and it's difficult to figure out that it actually disables the cache dir.Trying to set it to
true
gives the error below.What I've run:
In
pip.conf
, if I set no-cache-dir totrue
, in the intent of disabling cache dir:and then running e.g.
pip list
gives:The text was updated successfully, but these errors were encountered: