Skip to content

Make PIP_NO_CACHE_DIR behave as it reads, and not crash pip - #5884

Merged
cjerdonek merged 1 commit into
pypa:masterfrom
cjerdonek:pip-no-cache-dir-var
Nov 8, 2018
Merged

cjerdonek merged 1 commit into
pypa:masterfrom
cjerdonek:pip-no-cache-dir-var

Conversation

@cjerdonek

@cjerdonek cjerdonek commented Oct 14, 2018 •

Copy link
Copy Markdown
Member

This fixes issues #5385 and #5735 (the PIP_NO_CACHE_DIR half).

This solution preserves backwards compatibility by only changing the behavior for values like "1", "true", "yes", etc, which didn't work before -- only crashing pip.

@cjerdonek
cjerdonek force-pushed the pip-no-cache-dir-var branch 3 times, most recently from 2359f89 to 66a56a3 Compare October 14, 2018 08:43
@cjerdonek cjerdonek added C: configuration Configuration management and loading C: cache Dealing with cache and files in it T: bugfix labels Oct 14, 2018
@cjerdonek
cjerdonek force-pushed the pip-no-cache-dir-var branch 3 times, most recently from 99078fa to 39e80c8 Compare October 14, 2018 17:08
@cjerdonek cjerdonek added this to the 19.0 milestone Oct 14, 2018
@cjerdonek
cjerdonek force-pushed the pip-no-cache-dir-var branch from 39e80c8 to cb24ca6 Compare October 15, 2018 03:17
@cjerdonek cjerdonek mentioned this pull request Oct 16, 2018
8 tasks done

@pradyunsg pradyunsg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the tests! :)

Inline suggestion about changing on the implementation approach.

Comment thread src/pip/_internal/cli/cmdoptions.py Outdated
@pypa pypa deleted a comment from pradyunsg Oct 23, 2018
@pypa pypa deleted a comment from pradyunsg Oct 23, 2018
@pypa pypa deleted a comment from pradyunsg Oct 23, 2018
@pypa pypa deleted a comment from pradyunsg Oct 23, 2018
@pypa pypa deleted a comment from pradyunsg Oct 23, 2018
@pypa pypa deleted a comment from pradyunsg Oct 23, 2018
@pypa pypa deleted a comment from pradyunsg Oct 23, 2018
@cjerdonek
cjerdonek force-pushed the pip-no-cache-dir-var branch from cb24ca6 to 100d126 Compare October 25, 2018 09:03
@cjerdonek

Copy link
Copy Markdown
Member Author

I posted a new version that tries to use callbacks, as suggested by @pradyunsg. I'm not confident of the PR yet because of the interaction with the environment variables / config handling / etc, but all of the tests I wrote before still pass.

I also removed the issue numbers from the earlier commit message.

@cjerdonek
cjerdonek force-pushed the pip-no-cache-dir-var branch 5 times, most recently from 88ec3c4 to d05355d Compare October 25, 2018 19:58
@cjerdonek

Copy link
Copy Markdown
Member Author

@pradyunsg This is ready to review again. Thanks for taking a look before!

Comment thread src/pip/_internal/cli/cmdoptions.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment can go away.

Comment thread tests/unit/test_options.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice helper; maybe in the future we should look into if this can be used elsewhere in the test suite.

@pradyunsg

Copy link
Copy Markdown
Member

Sorry for the delay -- I'd reviewed this earlier but never actually submitted the review.

@cjerdonek
cjerdonek force-pushed the pip-no-cache-dir-var branch from d05355d to b94d719 Compare November 8, 2018 11:44
@cjerdonek

Copy link
Copy Markdown
Member Author

Thanks, @pradyunsg. I addressed your comment and squashed my commits (to delete my original unused approach from history).

@cjerdonek
cjerdonek merged commit fc1b1e4 into pypa:master Nov 8, 2018
@cjerdonek
cjerdonek deleted the pip-no-cache-dir-var branch November 8, 2018 22:19
@lock

lock Bot commented May 31, 2019

Copy link
Copy Markdown

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.

@lock lock Bot added the auto-locked Outdated issues that have been locked by automation label May 31, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators May 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

auto-locked Outdated issues that have been locked by automation C: cache Dealing with cache and files in it C: configuration Configuration management and loading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants