Skip to content

Commit b273cee

Browse files
committed
Combine one entry, explain difference between entries better.
1 parent d5e3f0c commit b273cee

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/pip/_internal/commands/cache.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,19 @@ def get_cache_info(self, options: Values, args: List[Any]) -> None:
9696
http_cache_location = self._cache_dir(options, "http-v2")
9797
old_http_cache_location = self._cache_dir(options, "http")
9898
wheels_cache_location = self._cache_dir(options, "wheels")
99-
http_cache_size = filesystem.format_directory_size(http_cache_location)
100-
old_http_cache_size = filesystem.format_directory_size(old_http_cache_location)
99+
http_cache_size = (
100+
filesystem.format_directory_size(http_cache_location) +
101+
filesystem.format_directory_size(old_http_cache_location)
102+
)
101103
wheels_cache_size = filesystem.format_directory_size(wheels_cache_location)
102104

103105
message = (
104106
textwrap.dedent(
105107
"""
106-
Package index page cache location (new): {http_cache_location}
107-
Package index page cache location (old): {old_http_cache_location}
108-
Package index page cache size (new): {http_cache_size}
109-
Package index page cache size (old): {old_http_cache_size}
110-
Number of HTTP files (old+new cache): {num_http_files}
108+
Package index page cache location (pip v23.3+): {http_cache_location}
109+
Package index page cache location (older pips): {old_http_cache_location}
110+
Package index page cache size: {http_cache_size}
111+
Number of HTTP files: {num_http_files}
111112
Locally built wheels location: {wheels_cache_location}
112113
Locally built wheels size: {wheels_cache_size}
113114
Number of locally built wheels: {package_count}
@@ -117,7 +118,6 @@ def get_cache_info(self, options: Values, args: List[Any]) -> None:
117118
http_cache_location=http_cache_location,
118119
old_http_cache_location=old_http_cache_location,
119120
http_cache_size=http_cache_size,
120-
old_http_cache_size=old_http_cache_size,
121121
num_http_files=num_http_files,
122122
wheels_cache_location=wheels_cache_location,
123123
package_count=num_packages,

tests/functional/test_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def test_cache_info(
203203
) -> None:
204204
result = script.pip("cache", "info")
205205

206-
assert f"Package index page cache location (new): {http_cache_dir}" in result.stdout
206+
assert f"Package index page cache location (pip v23.3+): {http_cache_dir}" in result.stdout
207207
assert f"Locally built wheels location: {wheel_cache_dir}" in result.stdout
208208
num_wheels = len(wheel_cache_files)
209209
assert f"Number of locally built wheels: {num_wheels}" in result.stdout

0 commit comments

Comments
 (0)