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

Sequential pip-compile calls leads to missed dependecies #1154

Closed
pohmelie opened this issue Jun 2, 2020 · 13 comments · Fixed by #1159
Closed

Sequential pip-compile calls leads to missed dependecies #1154

pohmelie opened this issue Jun 2, 2020 · 13 comments · Fixed by #1159
Labels
bug Something is not working resolver Related to dependency resolver

Comments

@pohmelie
Copy link

pohmelie commented Jun 2, 2020

We have subnormal requirements.in:

file:./krontech-core
file:./krontech-web

aiohttp >= 3.0.0, < 4.0.0
alembic >= 0.9.2
asyncpg >= 0.20.1, < 1.0.0
geojson >= 2.5.0
h5py >= 2.0.0
injector >= 0.13.0, < 0.16.0
jpeg4py >= 0.1.3
pillow >= 6.2.0, < 7.0.0
pypika >= 0.37.1, < 1.0.0
python-docx >= 0.8.10
pytz >= 2019.3
sqlalchemy[postgresql_psycopg2binary] >= 1.3.13, < 2.0.0
yarl >= 1.1.0

So, first two lines links to submodules with simple setup.py package description.

Environment Versions

  1. Ubuntu 20.04
  2. Python version: 3.8.3
  3. pip version: 20.1.1
  4. pip-tools version: 5.2.0

Steps to replicate

  1. pip-compile requirements.in -o requirements.txt
  2. Copy requirements.txt somewhere
  3. pip-compile requirements.in -o requirements.txt
  4. Compare copied and generated versions.

Expected result

They are the same

Actual result

Packages from submodules krontech-core and krontech-web are missed.

@atugushev
Copy link
Member

Hello @pohmelie,

Thanks for the report. Couldn't reproduce the bug. See details below:

$ cat foo/setup.py
from setuptools import setup
setup(name='foo', version='0.1', install_requires=['pytz'])

$ cat bar/setup.py
from setuptools import setup
setup(name='bar', version='0.1', install_requires=['six'])

$ cat requirements.in
file:./foo
click

$ pip-compile --no-header
file:./bar                # via -r requirements.in
click==7.1.2              # via -r requirements.in
file:./foo                # via -r requirements.in
pytz==2020.1              # via foo
six==1.15.0               # via bar

$ cp requirements.txt requirements.txt.orig

$ pip-compile --no-header
file:./bar                # via -r requirements.in
click==7.1.2              # via -r requirements.in
file:./foo                # via -r requirements.in
pytz==2020.1              # via foo
six==1.15.0               # via bar

$ sha1sum requirements.txt*
ac59f831da785a68612372a69d633742eb356085  requirements.txt
ac59f831da785a68612372a69d633742eb356085  requirements.txt.orig

@atugushev atugushev added bug Something is not working needs reproduce Need to reproduce an issue labels Jun 3, 2020
@pohmelie
Copy link
Author

pohmelie commented Jun 3, 2020

Maybe, it depends that origin setup.py have local reqs:

krontech-core @ file://localhost/path/to/package/krontech-core
krontech-web @ file://localhost/path/to/package/krontech-web

Or is it better to create github repo to repoduce this thing?

@atugushev
Copy link
Member

@pohmelie

Or is it better to create github repo to repoduce this thing?

That'd be super helpful!

@atugushev
Copy link
Member

@pohmelie

Also, could you reproduce the bug on pip-tools==5.1.0?

@pohmelie
Copy link
Author

pohmelie commented Jun 4, 2020

Ok, here is our exact case skeleton: https://github.com/pohmelie/pip-tools-1154

@pohmelie
Copy link
Author

pohmelie commented Jun 4, 2020

5.1.0 gives:

$ pip-compile requirements/production.in -o requirements/production.txt
Could not find a version that matches krontech-core>=3.0.0 (from krontech-web==0.13.2->-r requirements/production.in (line 2))
No versions found
Was https://pypi.org/simple reachable?

@Dandi91
Copy link

Dandi91 commented Jun 4, 2020

Looking at the changes in production.txt closely, it appears that only dependencies from krontech-core are missing. Packages from krontech-web are still present.

Maybe the 5.1.0 output is a hint to what is happening: pip-compile can't find krontech-core, but 5.2.0 is silencing this error somehow?

@atugushev
Copy link
Member

Ok, here is our exact case skeleton: https://github.com/pohmelie/pip-tools-1154

Thanks a lot, that's perfect! Will look into that.

@atugushev atugushev removed the needs reproduce Need to reproduce an issue label Jun 4, 2020
@atugushev
Copy link
Member

atugushev commented Jun 4, 2020

Looking at the changes in production.txt closely, it appears that only dependencies from krontech-core are missing. Packages from krontech-web are still present.

Maybe the 5.1.0 output is a hint to what is happening: pip-compile can't find krontech-core, but 5.2.0 is silencing this error somehow?

Looks like it is a regression that was introduced in c0b33e7 (#1132). There is also a related issue #1155.

/cc @richafrank

@atugushev
Copy link
Member

Could not find a version that matches krontech-core>=3.0.0 (from krontech-web==0.13.2->-r requirements/production.in (line 2))
No versions found
Was https://pypi.org/simple reachable?

So this is the real bug we have to figure out.

@atugushev
Copy link
Member

atugushev commented Jun 4, 2020

@pohmelie

The workaround is to add an egg fragment to krontech-core in production.in:

...
file:./krontech-core#egg=krontech-core
...

UPDATE: and temporarily downgrade to pip-tools-5.1.0

@pohmelie
Copy link
Author

pohmelie commented Jun 4, 2020

Okay, this is not critical for us, so watching this issue 👀

@atugushev
Copy link
Member

pip-tools v5.2.1 is released

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

Successfully merging a pull request may close this issue.

3 participants