Skip to content

Commit 0231a1d

Browse files
authored
Merge pull request #11303 from vanschelven/clarify-pip-cache-output
2 parents c4606b3 + 80c3b96 commit 0231a1d

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

news/11300.bugfix.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Clarify that ``pip cache``'s wheels-related output is about locally built wheels only.

src/pip/_internal/commands/cache.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ def get_cache_info(self, options: Values, args: List[Any]) -> None:
105105
Package index page cache location: {http_cache_location}
106106
Package index page cache size: {http_cache_size}
107107
Number of HTTP files: {num_http_files}
108-
Wheels location: {wheels_cache_location}
109-
Wheels size: {wheels_cache_size}
110-
Number of wheels: {package_count}
108+
Locally built wheels location: {wheels_cache_location}
109+
Locally built wheels size: {wheels_cache_size}
110+
Number of locally built wheels: {package_count}
111111
"""
112112
)
113113
.format(
@@ -140,7 +140,7 @@ def list_cache_items(self, options: Values, args: List[Any]) -> None:
140140

141141
def format_for_human(self, files: List[str]) -> None:
142142
if not files:
143-
logger.info("Nothing cached.")
143+
logger.info("No locally built wheels cached.")
144144
return
145145

146146
results = []

tests/functional/test_cache.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ def test_cache_info(
210210
result = script.pip("cache", "info")
211211

212212
assert f"Package index page cache location: {http_cache_dir}" in result.stdout
213-
assert f"Wheels location: {wheel_cache_dir}" in result.stdout
213+
assert f"Locally built wheels location: {wheel_cache_dir}" in result.stdout
214214
num_wheels = len(wheel_cache_files)
215-
assert f"Number of wheels: {num_wheels}" in result.stdout
215+
assert f"Number of locally built wheels: {num_wheels}" in result.stdout
216216

217217

218218
@pytest.mark.usefixtures("populate_wheel_cache")
@@ -242,9 +242,9 @@ def test_cache_list_abspath(script: PipTestEnvironment) -> None:
242242
@pytest.mark.usefixtures("empty_wheel_cache")
243243
def test_cache_list_with_empty_cache(script: PipTestEnvironment) -> None:
244244
"""Running `pip cache list` with an empty cache should print
245-
"Nothing cached." and exit."""
245+
"No locally built wheels cached." and exit."""
246246
result = script.pip("cache", "list")
247-
assert result.stdout == "Nothing cached.\n"
247+
assert result.stdout == "No locally built wheels cached.\n"
248248

249249

250250
@pytest.mark.usefixtures("empty_wheel_cache")

0 commit comments

Comments
 (0)