Yelp / venv-update

Synchronize your virtualenv quickly and exactly.
http://venv-update.rtfd.org
MIT License
176 stars 34 forks source link

Incompatible with pip 18.1 #214

Closed asottile closed 5 years ago

asottile commented 6 years ago
$ pip-faster install astpretty
Traceback (most recent call last):
  File "/tmp/h/venv/bin/pip-faster", line 11, in <module>
    sys.exit(main())
  File "/tmp/h/venv/lib/python3.6/site-packages/pip_faster.py", line 465, in main
    with pipfaster_packagefinder():
  File "/tmp/h/venv/lib/python3.6/site-packages/pip_faster.py", line 448, in pipfaster_packagefinder
    from pip._internal import basecommand
ImportError: cannot import name 'basecommand'

$ pip install 'pip<18.1'
Collecting pip<18.1
  Using cached https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 18.1
    Uninstalling pip-18.1:
      Successfully uninstalled pip-18.1
Successfully installed pip-18.0

$ pip-faster install astpretty
Collecting astpretty
  slow: full search for unpinned requirement astpretty
  Downloading https://files.pythonhosted.org/packages/e3/61/16a1e2e2bf6270513d90695ad0d442a3521ab790562901288ef272fdc91a/astpretty-1.4.0-py2.py3-none-any.whl
Installing collected packages: astpretty
Successfully installed astpretty-1.4.0
You are using pip version 18.0, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
asottile commented 6 years ago

looks like master just needs to be released -- this will restore pip<=18.0 upper bound.

A followup can then be done to restore compatibility with 18.1+

chriskuehl commented 6 years ago

Just released 3.1.1 which should fix this?

asottile commented 6 years ago

Looks good! thanks a ton @chriskuehl <3

h$ tox -e py27 --notest
py27 create: /tmp/h/.tox/py27
py27 bootstrap: venv-update>=2.1.3
py27 installdeps: coverage,mock,pytest,hypothesis,factory-boy,-rrequirements.txt
py27 installed: You are using pip version 18.0, however version 18.1 is available.,You should consider upgrading via the 'pip install --upgrade pip' command.,alembic==0.9.7,amqp==2.2.2,atomicwrites==1.2.1,attrs==18.2.0,backports.functools-lru-cache==1.2.1,bcrypt==3.1.3,billiard==3.5.0.3,bleach==2.1.3,celery==4.2.1,certifi==2016.2.28,cffi==1.7.0,Chameleon==2.24,click==6.6,colander==1.3.1,contextlib2==0.5.4,coverage==4.5.1,deform==0.9.9,deform-jinja2==0.5,elasticsearch==6.2.0,elasticsearch-dsl==6.1.0,enum34==1.1.6,factory-boy==2.11.1,Faker==0.9.1,funcsigs==1.0.2,functools32==3.2.3.post2,gevent==1.3.5,greenlet==0.4.13,gunicorn==19.9.0,hkdf==0.0.3,html5lib==0.999999999,hypothesis==3.74.2,ipaddress==1.0.18,iso8601==0.1.11,itsdangerous==0.24,Jinja2==2.10,jsonpointer==1.0,jsonschema==2.5.1,kombu==4.2.1,Mako==1.0.4,MarkupSafe==0.23,mistune==0.8.3,mock==2.0.0,more-itertools==4.3.0,newrelic==4.2.0.100,oauthlib==2.0.2,passlib==1.7.1,PasteDeploy==1.5.2,pathlib2==2.3.2,pbr==4.3.0,peppercorn==0.5,pluggy==0.7.1,psycogreen==1.0,psycopg2==2.7.3.2,py==1.6.0,pycparser==2.14,PyJWT==1.5.3,pyparsing==2.1.10,pyramid==1.7.3,pyramid-authsanity==1.0.0,pyramid-jinja2==2.6.2,pyramid-layout==1.0,pyramid-mailer==0.15.1,pyramid-services==0.4,pyramid-tm==1.1.1,pytest==3.8.2,python-dateutil==2.5.3,python-editor==1.0.1,python-slugify==1.1.4,pytz==2016.6.1,raven==6.0.0,repoze.lru==0.6,repoze.sendmail==4.3,requests==2.13.0,requests-aws4auth==0.9,scandir==1.9.0,six==1.10.0,SQLAlchemy==1.1.4,statsd==3.2.1,text-unidecode==1.2,transaction==2.1.2,translationstring==1.3,Unidecode==0.4.19,urllib3==1.22,venusian==1.0,venv-update==3.1.1,vine==1.1.4,webencodings==0.5.1,WebOb==1.6.1,ws4py==0.4.2,wsaccel==0.6.2,zope.deprecation==4.1.2,zope.interface==4.3.2,zope.sqlalchemy==1.0
___________________________________ summary ____________________________________
  py27: skipped tests
  congratulations :)

h$ tox --version
3.3.0 imported from /tmp/h/venv/lib/python3.6/site-packages/tox/__init__.py
registered plugins:
    tox-pip-extensions-1.4.0 at /tmp/h/venv/lib/python3.6/site-packages/tox_pip_extensions.py

CC @seanh

chriskuehl commented 6 years ago

\o/

asottile commented 6 years ago

~technically venv-update is still incompatible with 18.1 but at least setup.py limits it now :)

chriskuehl commented 6 years ago

Good point, I'll reopen this so we have some ticket about fixing that eventually.

ssbarnea commented 6 years ago

Holly.... I found this one day after I was happy to find a workaround for https://github.com/tox-dev/tox/issues/149 -- but apparently additing new build dependencies on tox-pip-extensions and venv-update would only create a much worse user experience.

Can we do somethign to fix this in a way that would not require downgrading pip? I know too many places in CI where pip is upgraded to latest.

Lucky for us pip had a good habbit on not breaking thinks, usually fixing things in new version which translated into users wanting to use latest.

asottile commented 6 years ago

Lucky for us pip had a good habbit on not breaking thinks

heh, the exact opposite seems to be true for venv-update 🙃

Can we do somethign to fix this in a way that would not require downgrading pip?

the way pip-faster works is by patching out parts of pip. It's unfortunately fundamentally tied to the internals of pip.

The way out would be upstreaming the interesting bits: