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 broken with pip 19.1 #794

Closed
tonal opened this issue Apr 24, 2019 · 6 comments
Closed

pip-compile broken with pip 19.1 #794

tonal opened this issue Apr 24, 2019 · 6 comments
Labels
bug Something is not working pip Related to pip

Comments

@tonal
Copy link

tonal commented Apr 24, 2019

Describe the issue briefly here.

Environment Versions
  1. OS Type
    linux KDE Neon
  2. Python version: $ python -V
    Python 3.7.3
  3. pip version: $ pip --version
    pip 19.1 from /home/User/.pyenv/versions/3.7.3/envs/test/lib/python3.7/site-packages/pip (python 3.7)
  4. pip-tools version: $ pip-compile --version
    pip-compile, version 3.6.0
Steps to replicate
  1. upgrade pip to latest version:
$ pip install -U pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/f9/fb/863012b13912709c13cf5cfdbfb304fa6c727659d6290438e1a88df9d848/pip-19.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 19.0.3
    Uninstalling pip-19.0.3:
      Successfully uninstalled pip-19.0.3
Successfully installed pip-19.1
  1. run pip-compile:
$ pip-compile -U
Traceback (most recent call last):
  File "/home/User/.pyenv/versions/3.7.3/envs/test/bin/pip-compile", line 10, in <module>
    sys.exit(cli())
  File "/home/User/.pyenv/versions/3.7.3/envs/test/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/User/.pyenv/versions/3.7.3/envs/test/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/User/.pyenv/versions/3.7.3/envs/test/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/User/.pyenv/versions/3.7.3/envs/test/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/User/.pyenv/versions/3.7.3/envs/test/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/User/.pyenv/versions/3.7.3/envs/test/lib/python3.7/site-packages/piptools/scripts/compile.py", line 352, in cli
    results = resolver.resolve(max_rounds=max_rounds)
  File "/home/User/.pyenv/versions/3.7.3/envs/test/lib/python3.7/site-packages/piptools/resolver.py", line 119, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/home/User/.pyenv/versions/3.7.3/envs/test/lib/python3.7/site-packages/piptools/resolver.py", line 217, in _resolve_one_round
    best_matches = {self.get_best_match(ireq) for ireq in constraints}
  File "/home/User/.pyenv/versions/3.7.3/envs/test/lib/python3.7/site-packages/piptools/resolver.py", line 217, in <setcomp>
    best_matches = {self.get_best_match(ireq) for ireq in constraints}
  File "/home/User/.pyenv/versions/3.7.3/envs/test/lib/python3.7/site-packages/piptools/resolver.py", line 291, in get_best_match
    ireq, prereleases=self.prereleases
  File "/home/User/.pyenv/versions/3.7.3/envs/test/lib/python3.7/site-packages/piptools/repositories/pypi.py", line 147, in find_best_match
    best_candidate = max(matching_candidates, key=self.finder._candidate_sort_key)
AttributeError: 'PackageFinder' object has no attribute '_candidate_sort_key'
@atugushev
Copy link
Member

atugushev commented Apr 24, 2019

Hello @tonal,

Thanks for the report! Could you please paste here your requirements.in and requirements.txt?

UPDATE: no need, seems it doesn't work at all.

@tonal
Copy link
Author

tonal commented Apr 24, 2019

requirements.in:

# -*- coding: utf-8 -*-

aiodns
aiohttp
aiomysql
cchardet
uvloop

aiostream

envparse
pyyaml

python-logstash
sentry-sdk

lxml

fastnumbers

requirements.txt:

#
# This file is autogenerated by pip-compile
# To update, run:
#
#    pip-compile -U
#
aiodns==2.0.0
aiohttp==3.5.4
aiomysql==0.0.20
aiostream==0.3.1
asn1crypto==0.24.0        # via cryptography
async-timeout==3.0.1      # via aiohttp
attrs==19.1.0             # via aiohttp
cchardet==2.1.4
certifi==2019.3.9         # via sentry-sdk
cffi==1.12.3              # via cryptography, pycares
chardet==3.0.4            # via aiohttp
cryptography==2.6.1       # via pymysql
envparse==0.2.0
fastnumbers==2.2.1
idna==2.8                 # via yarl
lxml==4.3.3
multidict==4.5.2          # via aiohttp, yarl
pycares==3.0.0            # via aiodns
pycparser==2.19           # via cffi
pymysql==0.9.2            # via aiomysql
python-logstash==0.4.6
pyyaml==5.1
sentry-sdk==0.7.11
six==1.12.0               # via cryptography
urllib3==1.25             # via sentry-sdk
uvloop==0.12.2
yarl==1.3.0               # via aiohttp

If downgrade pip to 19.0.3 all work.

@atugushev
Copy link
Member

atugushev commented Apr 24, 2019

There are breaking changes from pypa/pip#6424. Okay, let's make a compatible version.

@atugushev atugushev added pip Related to pip bug Something is not working labels Apr 24, 2019
@pkierski
Copy link

Do you plan to release this fix in near future?

@atugushev
Copy link
Member

Hello @pkierski. As soon as possible.

@atugushev atugushev pinned this issue Apr 24, 2019
@atugushev
Copy link
Member

pip-tools v3.6.1 is released.

@auvipy auvipy unpinned this issue May 3, 2019
rowanseymour added a commit to nyaruka/rapidpro that referenced this issue May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working pip Related to pip
Projects
None yet
Development

No branches or pull requests

3 participants