mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Remove no-binary disabling the cache of locally built wheels
This commit is contained in:
parent
28239f9bf7
commit
8f0201f67a
5 changed files with 12 additions and 43 deletions
2
news/11453.removal.rst
Normal file
2
news/11453.removal.rst
Normal file
|
@ -0,0 +1,2 @@
|
|||
``--no-binary`` does not disable the cache of locally built wheels anymore. It only
|
||||
means "don't download wheels".
|
|
@ -1004,7 +1004,7 @@ use_new_feature: Callable[..., Option] = partial(
|
|||
choices=[
|
||||
"fast-deps",
|
||||
"truststore",
|
||||
"no-binary-enable-wheel-cache",
|
||||
"no-binary-enable-wheel-cache", # now always on
|
||||
],
|
||||
help="Enable new functionality, that may be backward incompatible.",
|
||||
)
|
||||
|
|
|
@ -30,10 +30,7 @@ from pip._internal.req.req_install import (
|
|||
check_legacy_setup_py_options,
|
||||
)
|
||||
from pip._internal.utils.compat import WINDOWS
|
||||
from pip._internal.utils.deprecation import (
|
||||
LegacyInstallReasonFailedBdistWheel,
|
||||
deprecated,
|
||||
)
|
||||
from pip._internal.utils.deprecation import LegacyInstallReasonFailedBdistWheel
|
||||
from pip._internal.utils.filesystem import test_writable_dir
|
||||
from pip._internal.utils.logging import getLogger
|
||||
from pip._internal.utils.misc import (
|
||||
|
@ -347,23 +344,9 @@ class InstallCommand(RequirementCommand):
|
|||
check_legacy_setup_py_options(options, reqs)
|
||||
|
||||
if "no-binary-enable-wheel-cache" in options.features_enabled:
|
||||
# TODO: remove format_control from WheelCache when the deprecation cycle
|
||||
# is over
|
||||
logger.warning("no-binary-enable-wheel-cache is now active by default.")
|
||||
|
||||
wheel_cache = WheelCache(options.cache_dir)
|
||||
else:
|
||||
if options.format_control.no_binary:
|
||||
deprecated(
|
||||
reason=(
|
||||
"--no-binary currently disables reading from "
|
||||
"the cache of locally built wheels. In the future "
|
||||
"--no-binary will not influence the wheel cache."
|
||||
),
|
||||
replacement="to use the --no-cache-dir option",
|
||||
feature_flag="no-binary-enable-wheel-cache",
|
||||
issue=11453,
|
||||
gone_in="23.1",
|
||||
)
|
||||
wheel_cache = WheelCache(options.cache_dir, options.format_control)
|
||||
|
||||
# Only when installing is it permitted to use PEP 660.
|
||||
# In other circumstances (pip wheel, pip download) we generate
|
||||
|
|
|
@ -14,7 +14,6 @@ from pip._internal.req.req_install import (
|
|||
InstallRequirement,
|
||||
check_legacy_setup_py_options,
|
||||
)
|
||||
from pip._internal.utils.deprecation import deprecated
|
||||
from pip._internal.utils.misc import ensure_dir, normalize_path
|
||||
from pip._internal.utils.temp_dir import TempDirectory
|
||||
from pip._internal.wheel_builder import build, should_build_for_wheel_command
|
||||
|
@ -106,7 +105,6 @@ class WheelCommand(RequirementCommand):
|
|||
session = self.get_default_session(options)
|
||||
|
||||
finder = self._build_package_finder(options, session)
|
||||
wheel_cache = WheelCache(options.cache_dir, options.format_control)
|
||||
|
||||
options.wheel_dir = normalize_path(options.wheel_dir)
|
||||
ensure_dir(options.wheel_dir)
|
||||
|
@ -123,23 +121,9 @@ class WheelCommand(RequirementCommand):
|
|||
check_legacy_setup_py_options(options, reqs)
|
||||
|
||||
if "no-binary-enable-wheel-cache" in options.features_enabled:
|
||||
# TODO: remove format_control from WheelCache when the deprecation cycle
|
||||
# is over
|
||||
logger.warning("no-binary-enable-wheel-cache is now active by default.")
|
||||
|
||||
wheel_cache = WheelCache(options.cache_dir)
|
||||
else:
|
||||
if options.format_control.no_binary:
|
||||
deprecated(
|
||||
reason=(
|
||||
"--no-binary currently disables reading from "
|
||||
"the cache of locally built wheels. In the future "
|
||||
"--no-binary will not influence the wheel cache."
|
||||
),
|
||||
replacement="to use the --no-cache-dir option",
|
||||
feature_flag="no-binary-enable-wheel-cache",
|
||||
issue=11453,
|
||||
gone_in="23.1",
|
||||
)
|
||||
wheel_cache = WheelCache(options.cache_dir, options.format_control)
|
||||
|
||||
preparer = self.make_requirement_preparer(
|
||||
temp_build_dir=directory,
|
||||
|
|
|
@ -1656,7 +1656,7 @@ def test_install_no_binary_uses_local_backend(
|
|||
assert os.path.isfile(marker), "Local PEP 517 backend not used"
|
||||
|
||||
|
||||
def test_install_no_binary_disables_cached_wheels(
|
||||
def test_install_no_binary_uses_cached_wheels(
|
||||
script: PipTestEnvironment, data: TestData
|
||||
) -> None:
|
||||
# Seed the cache
|
||||
|
@ -1673,7 +1673,7 @@ def test_install_no_binary_disables_cached_wheels(
|
|||
)
|
||||
assert "Successfully installed upper-2.0" in str(res), str(res)
|
||||
# upper is built and not obtained from cache
|
||||
assert "Building wheel for upper" in str(res), str(res)
|
||||
assert "Building wheel for upper" not in str(res), str(res)
|
||||
|
||||
|
||||
def test_install_editable_with_wrong_egg_name(
|
||||
|
|
Loading…
Reference in a new issue