Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip-compile skips transitive dependencies on python 3.7 #928

Closed
tuukkamustonen opened this issue Oct 8, 2019 · 5 comments
Closed

pip-compile skips transitive dependencies on python 3.7 #928

tuukkamustonen opened this issue Oct 8, 2019 · 5 comments
Labels
bug Something is not working cache Related to dependency cache needs reproduce Need to reproduce an issue

Comments

@tuukkamustonen
Copy link

tuukkamustonen commented Oct 8, 2019

pip-compile skips transitive dependency on python 3.7.

Environment Versions

  1. OS Type: Linux
  2. Python version: 3.7.4
  3. pip version: 19.2.3
  4. pip-tools version: 4.1.0

Steps to replicate

$ echo "pydocstyle" > requirements.in

Works on python 3.6 (and 3.5):

$ pyenv install 3.6.6 py36
$ pyenv activate py36
$ pip install -U pip pip-tools
$ pip-compile --no-header --no-index
pydocstyle==4.0.1
snowballstemmer==2.0.0    # via pydocstyle

(snowballstemmer is the transitive dependency we are after here. Read on.)

Fails on python 3.7:

$ pyenv install 3.7.4 py37
$ pyenv activate py37
$ pip install -U pip pip-tools
$ pip-compile --no-header --no-index
pydocstyle==4.0.1
$ pip install pydocstyle  # the missing requirement is actually needed on py3.7, too
...
Installing collected packages: snowballstemmer, pydocstyle
Successfully installed pydocstyle-4.0.1 snowballstemmer-2.0.0

Interestingly, pydocstyle < 4 installs just fine! Still within python 3.7 env:

$ echo "pydocstyle<4" > requirements.in
$ pip-compile --no-header --no-index
pydocstyle==3.0.0
six==1.12.0               # via pydocstyle
snowballstemmer==2.0.0    # via pydocstyle

Took a look at pydocstyle changes into 4.x, but they have only added python_requires='>=3.5' to setup.py as far as I can tell.

Also reproduces with pylint (where it skips even more dependencies).

@tuukkamustonen tuukkamustonen changed the title pip-compile skips transitive dependencies pip-compile skips transitive dependencies on python 3.7 Oct 8, 2019
@tuukkamustonen
Copy link
Author

Uh, I think --rebuild fixed this issue (didn't remember #835 right away).

Annoying, next time this happens, what information (and how) can I provide, to get to the root of it?

@atugushev
Copy link
Member

Hello @tuukkamustonen,

Aw, you've caught it again. Next time this happens run pip-compile with --verbose flag and preserve the output. Also, having a dependency cache file attached to the issue would help to investigate the problem. The cache file you may find here:

  • Unix: ~/.cache/pip-tools
  • Mac OS: ~/Library/Caches/pip-tools/
  • Windows: <CSIDL_LOCAL_APPDATA>\pip\Cache

@atugushev atugushev added bug Something is not working needs reproduce Need to reproduce an issue labels Oct 8, 2019
@tuukkamustonen
Copy link
Author

Thanks! I'll try to remember this and embed full details :| Closing this now.

@atugushev
Copy link
Member

@tuukkamustonen

Just wondering, have you used constraints files with pip-tools (e.g., -c constraints.txt)? This might cause a bug with the cache. See #1037 where we've caught it.

@tuukkamustonen
Copy link
Author

@atugushev Appreciate for checking back on this 🙏. Yeah, I'm using pip constraints these days, but I'm not sure if I had those back when I encountered the problems.

I'll check the linked ticket! (And thanks for the awesome tool btw.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working cache Related to dependency cache needs reproduce Need to reproduce an issue
Projects
None yet
Development

No branches or pull requests

2 participants