extras not installed when a dep is mentioned in a constraints file
rbtcollins opened this issue · 1 comments
Workaround
Include the extras to be installed in the constraints file
details
pip install -c c.txt zope.security[untrustedpython]
Collecting zope.security==3.8.3 (from -c c.txt (line 1))
Downloading zope.security-3.8.3.tar.gz (103kB)
100% |████████████████████████████████| 106kB 2.0MB/s
...
Successfully installed zope.security-3.8.3
$ cat c.txt
zope.security==3.8.3
Whats happening is that we're not updating the requirement with additional extras encountered. This is a subset of the 'we don't do resolution' problem - we should be merging in all extras referenced anywhere in the dep graph today, and in future we should be doing that as part of full resolution too.
The minimal test case today would be two packages A and B, A declares an extra containing B, a constraints file that contains A, and pip install -c file A[extra].
I think this is a special case of the more general one I filed as #3189 . I think its worth closing this as a dupe and making the patch for the other be sure to include a constraints test.