jazzband / pip-tools

A set of tools to keep your pinned Python dependencies fresh.
https://pip-tools.rtfd.io
BSD 3-Clause "New" or "Revised" License
7.74k stars 612 forks source link

Dependency stops getting locked if switching to Git install #1575

Closed Gallaecio closed 2 years ago

Gallaecio commented 2 years ago

All works as expected when using regular packages:

$ cat requirements.in 
scrapinghub-entrypoint-scrapy
scrapy==2.5.1
$ pip-compile |& grep twisted
    #   twisted
    # via twisted
    # via twisted
    #   twisted
    # via twisted
    # via twisted
    # via twisted
twisted[http2]==22.1.0
    # via twisted
    #   twisted

However, if I install the very same Scrapy version from Git instead of from the Python Package Index, twisted is no longer frozen:

$ cat requirements.in 
scrapinghub-entrypoint-scrapy
git+https://github.com/scrapy/scrapy.git@2.5.1#egg=scrapy
$ pip-compile |& grep twisted

Note: It would not surprise me if this is a known issue, but I have checked for possible existing items, but while there are multiple issues about extras, I could not find any that specifically mention the combination of extras and installation from Git being an issue.

AndydeCleyre commented 2 years ago

This looks to me to be fixed in PR #1519. Hopefully that (and a handful of other PRs) will soon make it to master.

atugushev commented 2 years ago

New resolver from #1539 also fixes this issue.

Details ```console $ pip-compile --resolver backtracking # # This file is autogenerated by pip-compile with python 3.8 # To update, run: # # pip-compile --resolver=backtracking # attrs==21.4.0 # via # automat # service-identity # twisted automat==20.2.0 # via twisted certifi==2021.10.8 # via requests cffi==1.15.0 # via cryptography charset-normalizer==2.0.12 # via requests constantly==15.1.0 # via twisted cryptography==36.0.1 # via # pyopenssl # scrapy # service-identity cssselect==1.1.0 # via # parsel # scrapy h2==3.2.0 # via # scrapy # twisted hpack==3.0.0 # via h2 hyperframe==5.2.0 # via h2 hyperlink==21.0.0 # via twisted idna==3.3 # via # hyperlink # requests incremental==21.3.0 # via twisted itemadapter==0.4.0 # via # itemloaders # scrapy itemloaders==1.0.4 # via scrapy jmespath==0.10.0 # via itemloaders lxml==4.8.0 # via # parsel # scrapy parsel==1.6.0 # via # itemloaders # scrapy priority==1.3.0 # via twisted protego==0.2.1 # via scrapy pyasn1==0.4.8 # via # pyasn1-modules # service-identity pyasn1-modules==0.2.8 # via service-identity pycparser==2.21 # via cffi pydispatcher==2.0.5 # via scrapy pyopenssl==22.0.0 # via scrapy queuelib==1.6.2 # via scrapy requests==2.27.1 # via scrapinghub retrying==1.3.3 # via scrapinghub scrapinghub==2.3.1 # via scrapinghub-entrypoint-scrapy scrapinghub-entrypoint-scrapy==0.12.1 # via -r requirements.in scrapy @ git+https://github.com/scrapy/scrapy.git@2.5.1 # via # -r requirements.in # scrapinghub-entrypoint-scrapy service-identity==21.1.0 # via scrapy six==1.16.0 # via # automat # parsel # protego # retrying # scrapinghub # service-identity # w3lib twisted[http2]==22.1.0 # via scrapy typing-extensions==4.1.1 # via twisted urllib3==1.26.8 # via requests w3lib==1.22.0 # via # itemloaders # parsel # scrapy zope-interface==5.4.0 # via # scrapy # twisted # The following packages are considered to be unsafe in a requirements file: # setuptools ```
AndydeCleyre commented 2 years ago

Closing as fixed by #1519, thanks!