-
-
Notifications
You must be signed in to change notification settings - Fork 629
Description
Given the following requirements.in
file without any pinned version:
playwright
titlecase
And this playwright.txt
with both packages outdated:
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile
#
greenlet==3.2.2
# via playwright
playwright==1.51.0
# via -r requirements.in
pyee==12.1.1
# via playwright
titlecase==2.3
# via -r requirements.in
typing-extensions==4.13.2
# via pyee
I expect pip-compile --upgrade-package playwright
to update playwright
to the latest version (1.52
at the time of writing), but it stays at 1.51.0
:
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile
#
greenlet==3.2.2
# via playwright
playwright==1.51.0
# via -r requirements.in
pyee==12.1.1
# via playwright
titlecase==2.3
# via -r requirements.in
typing-extensions==4.13.2
# via pyee
Doing general pip-compile --upgrade
or giving the version number pip-compile --upgrade-package playwright==1.52
works as intended. But the first will update all packages, while the second requires knowing the latest version number. According to the documentation, a --upgrade-package
is supposed to update a single package to the latest version.
Environment Versions
- Ubuntu 25.04
- Python version: 3.10.12
- pip version: 22.0.2
- pip-tools version: 7.3.0
Steps to replicate
- create a requirement.in with this content:
playwright
titlecase
and a requirement.txt with these outdated version:
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile
#
greenlet==3.2.2
# via playwright
playwright==1.51.0
# via -r requirements.in
pyee==12.1.1
# via playwright
titlecase==2.3
# via -r requirements.in
typing-extensions==4.13.2
# via pyee
- Run
pip-compile --upgrade-package playwright
Expected result
playwright
should now be at version 1.52
in the requirement.txt
Actual result
The requirements.txt
does not change. The version can only be updated with either
- first removing the
requirements.txt
and runningpip-compile
(this will update all dependencies) - running
pip-compile --upgrade
(again this will update everything) - specifying the version number with
pip-compile --upgrade-package playwright==1.52
, this works, but requires a lookup of the version number first.