diff --git a/news/11300.bugfix.rst b/news/11300.bugfix.rst new file mode 100644 index 00000000000..f72f7ee9f4a --- /dev/null +++ b/news/11300.bugfix.rst @@ -0,0 +1 @@ +Clarify that ``pip cache``'s wheels-related output is about locally built wheels only. diff --git a/src/pip/_internal/commands/cache.py b/src/pip/_internal/commands/cache.py index f1a489d324f..c5f03302d6b 100644 --- a/src/pip/_internal/commands/cache.py +++ b/src/pip/_internal/commands/cache.py @@ -105,9 +105,9 @@ def get_cache_info(self, options: Values, args: List[Any]) -> None: Package index page cache location: {http_cache_location} Package index page cache size: {http_cache_size} Number of HTTP files: {num_http_files} - Wheels location: {wheels_cache_location} - Wheels size: {wheels_cache_size} - Number of wheels: {package_count} + Locally built wheels location: {wheels_cache_location} + Locally built wheels size: {wheels_cache_size} + Number of locally built wheels: {package_count} """ ) .format( @@ -140,7 +140,7 @@ def list_cache_items(self, options: Values, args: List[Any]) -> None: def format_for_human(self, files: List[str]) -> None: if not files: - logger.info("Nothing cached.") + logger.info("No locally built wheels cached.") return results = [] diff --git a/tests/functional/test_cache.py b/tests/functional/test_cache.py index 712e08a85cc..7d20f5e3100 100644 --- a/tests/functional/test_cache.py +++ b/tests/functional/test_cache.py @@ -210,9 +210,9 @@ def test_cache_info( result = script.pip("cache", "info") assert f"Package index page cache location: {http_cache_dir}" in result.stdout - assert f"Wheels location: {wheel_cache_dir}" in result.stdout + assert f"Locally built wheels location: {wheel_cache_dir}" in result.stdout num_wheels = len(wheel_cache_files) - assert f"Number of wheels: {num_wheels}" in result.stdout + assert f"Number of locally built wheels: {num_wheels}" in result.stdout @pytest.mark.usefixtures("populate_wheel_cache") @@ -242,9 +242,9 @@ def test_cache_list_abspath(script: PipTestEnvironment) -> None: @pytest.mark.usefixtures("empty_wheel_cache") def test_cache_list_with_empty_cache(script: PipTestEnvironment) -> None: """Running `pip cache list` with an empty cache should print - "Nothing cached." and exit.""" + "No locally built wheels cached." and exit.""" result = script.pip("cache", "list") - assert result.stdout == "Nothing cached.\n" + assert result.stdout == "No locally built wheels cached.\n" @pytest.mark.usefixtures("empty_wheel_cache")