extras not installed when a dep is mentioned in a constraints file #3046

Closed
rbtcollins opened this Issue Aug 21, 2015 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

rbtcollins commented Aug 21, 2015

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].

nakato added a commit to nakato/pip that referenced this issue Aug 24, 2015

Constraints: Join constaints and requested extras
If a dep is mentioned in constraints we just take that version, meaning we
will completely ignore any extras requested on the command line or in a
requirments file.  This takes a union of the two before installing.

Closes #3046

nakato added a commit to nakato/pip that referenced this issue Sep 29, 2015

Constraints: Join constaints and requested extras
If a dep is mentioned in constraints we just take that version, meaning we
will completely ignore any extras requested on the command line or in a
requirments file.  This takes a union of the two before installing.

Closes #3046
Contributor

rbtcollins commented Oct 19, 2015

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.

@rbtcollins rbtcollins closed this Oct 19, 2015

s-t-e-v-e-n-k added a commit to s-t-e-v-e-n-k/pip that referenced this issue Nov 10, 2015

Join constraints or dependencies and requested extras
If a dependency is mentioned in constraints we just take that version,
meaning we will completely ignore any extras requested on the command
line or in a requirments file.  This takes a union of the two before
installing.

Co-Authored-By: Sachi King <nakato@nakato.io>
Closes #3046, #3189

s-t-e-v-e-n-k added a commit to s-t-e-v-e-n-k/pip that referenced this issue Nov 20, 2015

Join constraints and requested extras
Compare extras when checking if a requirement has already been
specified, and take a union of the extras before installation.

Co-Authored-By: Sachi King <nakato@nakato.io>
Closes #3046, #3189

s-t-e-v-e-n-k added a commit to s-t-e-v-e-n-k/pip that referenced this issue Nov 20, 2015

Join constraints and requested extras
Compare extras when checking if a requirement has already been
specified, and take a union of the extras before installation.

Co-Authored-By: Sachi King <nakato@nakato.io>
Closes #3046, #3189
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment