1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
pip/src/pip/_internal/commands
Stéphane Bidoul (ACSONE) 0e1e0ef566 _should_cache does not depend on check_binary_allowed
_should_cache is only called by _get_cache_dir.

In pip install mode, _get_cache_dir is never called when
check_binary_allowed returns False because in that case
should_build_for_install_command has returned False before
and the build was skipped.

In pip wheel mode, check_binary_allowed always returns True
(because it is not passed to the build function).

So _should_cache can use _always_true for check_binary_allowed.

*Alternative*

Alternatively, we could have passed check_binary_allowed
to build in pip wheel mode. The only difference is that wheels built
locally from *legacy* packages would then not be cached,
when pip wheel is used with --no-binary.
2020-01-20 10:41:48 +01:00
..
__init__.py add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
check.py add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
completion.py add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
configuration.py Remove the deprecated pip config --venv option (#7163) 2019-10-09 23:28:00 +02:00
debug.py Use packaging.tags.Tag in place of Tuple 2020-01-07 01:42:42 -05:00
download.py Check that the cache is writable in _main() 2019-12-28 13:04:54 +01:00
freeze.py add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
hash.py add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
help.py add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
install.py _should_cache does not depend on check_binary_allowed 2020-01-20 10:41:48 +01:00
list.py Update imports to {index -> index.package_finder} 2019-10-19 22:24:01 +05:30
search.py add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
show.py add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
uninstall.py add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
wheel.py Remove unused build() argument 2020-01-05 23:52:42 +01:00