You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that passing a package range to -P when also using --autoresolve and more than one layer of requirements causes pip-compile-multi to get confused about where some of the version pins are coming from.
This is reproducible with:
requirements/prod.in:
markupsafe
requirements/prod.txt:
# SHA1:2f781f20c9698050fd9afac72c0364db5deacb05
#
# This file is autogenerated by pip-compile-multi
# To update, run:
#
# pip-compile-multi
#
markupsafe==2.0.1
# via
# -c requirements/tests.txt
# -r requirements/prod.in
requirements/tests.in:
-r prod.in
requirements/tests.txt:
# SHA1:939d3916ae2e78296c77d899249472d04707c772
#
# This file is autogenerated by pip-compile-multi
# To update, run:
#
# pip-compile-multi
#
-r prod.txt
then:
$ pip-compile-multi --autoresolve -P 'markupsafe<2.1.2'
Creating a temporary file with all dependencies at requirements/tests.txt
Locking requirements/prod.in to requirements/prod.txt. References: []
Locking requirements/tests.in to requirements/tests.txt. References: ['requirements/prod.in']
Package markupsafe was resolved to different versions in different environments: 2.1.1 and 2.0.1
Traceback (most recent call last):
File "/tmp/venv/lib/python3.10/site-packages/pipcompilemulti/cli_v1.py", line 26, in cli
recompile()
File "/tmp/venv/lib/python3.10/site-packages/pipcompilemulti/actions.py", line 31, in recompile
compile_topologically(env_confs, deduplicator)
File "/tmp/venv/lib/python3.10/site-packages/pipcompilemulti/actions.py", line 38, in compile_topologically
ifenv.maybe_create_lockfile():
File "/tmp/venv/lib/python3.10/site-packages/pipcompilemulti/environment.py", line 51, in maybe_create_lockfile
self.create_lockfile()
File "/tmp/venv/lib/python3.10/site-packages/pipcompilemulti/environment.py", line 72, in create_lockfile
self.fix_lockfile()
File "/tmp/venv/lib/python3.10/site-packages/pipcompilemulti/environment.py", line 134, in fix_lockfile
sections = [
File "/tmp/venv/lib/python3.10/site-packages/pipcompilemulti/environment.py", line 135, in<listcomp>
self.fix_pin(section)
File "/tmp/venv/lib/python3.10/site-packages/pipcompilemulti/environment.py", line 211, in fix_pin
raise RuntimeError(
RuntimeError: Please add constraints for the package version listed above
The text was updated successfully, but these errors were encountered:
PeterJCLaw
added a commit
to PeterJCLaw/pip-compile-multi
that referenced
this issue
May 4, 2023
The issue reported in peterdemin#393
turns out to have also been fixed by the range handling fix in the
previous commit. This adds a test which verifies that.
Fixespeterdemin#393
It seems that passing a package range to
-P
when also using--autoresolve
and more than one layer of requirements causespip-compile-multi
to get confused about where some of the version pins are coming from.This is reproducible with:
requirements/prod.in
:requirements/prod.txt
:requirements/tests.in
:requirements/tests.txt
:then:
The text was updated successfully, but these errors were encountered: