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
Starting with pip-tools>=6.3.1, if I have a package A that depends on a VCS (git) package B and C via requirements.in, and B also depends on C via setup.py, then C's dependencies are not present in the compiled requirements.txt.
Environment Versions
OS Type: Linux
Python version: Python 3.10.2
pip version: 22.0.3
pip-tools version: 6.5.1
Steps to replicate
Define packages A, B, and C.
On package C, via setup.py, require pymongo and jsonschema
On package B, via setup.py require C (not via PEP 440 URLs, just bare C) and pymongo
On package A, via requirements.in, require B, C, and pymongo
Compile requirements.txt via A's requirements.in
A set of repositories has been prepared to demonstrate this:
Repository A should be taken as the root. It contains a README.md with brief instructions on how to set it up and run the test.
Expected result
jsonschema should be present in the output requirements.txt, as it's a dependency of C, as well as jsonschema's dependencies.
pymongo should appear as viaA, B, and C in the output requirements.txt.
Actual result
jsonschema is absent from the compiled file (i.e., C-specific dependencies are lost).
pymongo only appears as via A and B.
Additional observations
This behaviour only appears with pip-tools>=6.3.1. Version <=6.3.0 does what I consider to be the correct behaviour, which is to lock C's dependencies too.
If B is modified to remove the dependency on C, then the compiled requirements.txt does contain jsonschema on 6.3.1 and above, as expected.
Modifying B's setup.py to include C via a VCS URL does not produce the correct result either.
Depending on B and C via non-editable URLs does not seem to affect the result.
The text was updated successfully, but these errors were encountered:
Starting with
pip-tools>=6.3.1
, if I have a packageA
that depends on a VCS (git) packageB
andC
viarequirements.in
, andB
also depends onC
viasetup.py
, thenC
's dependencies are not present in the compiledrequirements.txt
.Environment Versions
Linux
Python 3.10.2
22.0.3
6.5.1
Steps to replicate
A
,B
, andC
.C
, viasetup.py
, requirepymongo
andjsonschema
B
, viasetup.py
requireC
(not via PEP 440 URLs, just bareC
) andpymongo
A
, viarequirements.in
, requireB
,C
, andpymongo
requirements.txt
viaA
'srequirements.in
A set of repositories has been prepared to demonstrate this:
Repository
A
should be taken as the root. It contains aREADME.md
with brief instructions on how to set it up and run the test.Expected result
jsonschema
should be present in the outputrequirements.txt
, as it's a dependency ofC
, as well asjsonschema
's dependencies.pymongo
should appear asvia
A
,B
, andC
in the outputrequirements.txt
.Actual result
jsonschema
is absent from the compiled file (i.e.,C
-specific dependencies are lost).pymongo
only appears as viaA
andB
.Additional observations
pip-tools>=6.3.1
. Version<=6.3.0
does what I consider to be the correct behaviour, which is to lockC
's dependencies too.B
is modified to remove the dependency onC
, then the compiledrequirements.txt
does containjsonschema
on6.3.1
and above, as expected.B
'ssetup.py
to includeC
via a VCS URL does not produce the correct result either.B
andC
via non-editable URLs does not seem to affect the result.The text was updated successfully, but these errors were encountered: