Skip to content

Commit 906b877

Browse files
committed
Clarify pip cache output
pip cache reported 'Nothing cached' and 'Number of wheels: 0' even when things were obviously cached. The reason, as per @uranusjr's comment is 1. If a wheel is downloaded (from a secure source), pip uses the network layer cache (provided by a requests extension implemented with cachecontrol) in ${CACHE_DIR}/http. 2. If a wheel is built from source, pip caches it separately in ${CACHE_DIR}/wheels. 3. The pip cache list command is currently only capable of showing entries in the wheel cache, not the network cache. The solution is to clarify what `pip cache` is reporting about.
1 parent c4606b3 commit 906b877

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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+
Built wheels location: {wheels_cache_location}
109+
Built wheels size: {wheels_cache_size}
110+
Number of 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 = []

0 commit comments

Comments
 (0)