1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Merge pull request #11303 from vanschelven/clarify-pip-cache-output

This commit is contained in:
Tzu-ping Chung 2022-07-26 15:01:52 +08:00 committed by GitHub
commit 0231a1d9b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 8 deletions

1
news/11300.bugfix.rst Normal file
View file

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

View file

@ -105,9 +105,9 @@ class CacheCommand(Command):
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 @@ class CacheCommand(Command):
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 = []

View file

@ -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")