Description
pip index versions has logic that prints INSTALLED: %s (latest) when the installed version is the newest, but a type mismatch in the comparison keeps that branch from ever being taken. So instead of the (latest) marker, a separate LATEST: line is printed.
code:
|
if dist.version == latest: |
|
write_output("INSTALLED: %s (latest)", dist.version) |
|
else: |
|
write_output("INSTALLED: %s", dist.version) |
|
if parse_version(latest).pre: |
|
write_output( |
|
"LATEST: %s (pre-release; install" |
|
" with `pip install --pre`)", |
|
latest, |
|
) |
|
else: |
|
write_output("LATEST: %s", latest) |
Note that fixing the comparison would remove the LATEST: line that is currently printed.
Expected behavior
$ pip index versions django
django (6.0.7)
Available versions: 6.0.7, 6.0.6, 6.0.5, ...
INSTALLED: 6.0.7 (latest)
pip version
26.1.2
Python version
3.14
OS
mac os
How to Reproduce
pip install django (6.0.7 is the latest release)
pip index versions django
Output
$ pip index versions django
django (6.0.7)
Available versions: 6.0.7, 6.0.6, 6.0.5, ...
INSTALLED: 6.0.7
LATEST: 6.0.7
Code of Conduct
Description
pip index versionshas logic that printsINSTALLED: %s (latest)when the installed version is the newest, but a type mismatch in the comparison keeps that branch from ever being taken. So instead of the(latest)marker, a separateLATEST:line is printed.code:
pip/src/pip/_internal/commands/search.py
Lines 119 to 130 in b834bb8
Note that fixing the comparison would remove the
LATEST:line that is currently printed.Expected behavior
pip version
26.1.2
Python version
3.14
OS
mac os
How to Reproduce
pip install django(6.0.7 is the latest release)pip index versions djangoOutput
Code of Conduct