chtd / psycopg2cffi

Port to cffi with some speed improvements
Other
177 stars 43 forks source link

Installing requires cffi<1.0 #65

Open youknowone opened 8 years ago

youknowone commented 8 years ago

I am on mac and using pyenv-ed pypy 5.3. I didn't have this problem in my linux box, but only in mac. Even after uninstalling psycopg2cffi, i am getting same error.

 ✗ pip install --upgrade psycopg2cffi                                               
Collecting psycopg2cffi
Requirement already up-to-date: six in /Volumes/UserSpace/Projects/beat/envpypy/site-packages (from psycopg2cffi)
Collecting cffi<1.0 (from psycopg2cffi)
Requirement already up-to-date: pycparser in /Volumes/UserSpace/Projects/beat/envpypy/site-packages (from cffi<1.0->psycopg2cffi)
Installing collected packages: cffi, psycopg2cffi
  Found existing installation: cffi 1.7.0
    Not uninstalling cffi at /Users/<masked>/.pyenv/versions/pypy-5.3/lib_pypy, outside environment /Volumes/UserSpace/Projects/beat/envpypy
Successfully installed cffi-1.7.0 psycopg2cffi-2.7.4
lopuhin commented 8 years ago

Thanks for the bug report! I failed to reproduce with a clean virtualenv on Mac OS X (with up-to date pip and wheel). Here is the code that could cause requirement cffi<1.0: https://github.com/chtd/psycopg2cffi/blob/master/setup.py#L27. Could you please tell the output of running python -c "import _cffi_backend; print(_cffi_backend.__version__)" in the virtual environment? Also, could you please give the steps for creating the virtual environment? outside environment looks strange to me.

youknowone commented 8 years ago

Here:

$ python -c "import _cffi_backend; print(_cffi_backend.__version__)"
1.7.0

I think the path of "outside environment" means built-in cffi of pypy. I installed pypy-5.3 via pyenv and created a virtuelenv from that.

$ pyenv install pypy-5.3
$ virtualenv -p ~/.pyenv/versions/pypy-5.3/bin/pypy envpypy

I found one more weird behavoir - I can install 2.7.2 without the message.

$ pip install --upgrade psycopg2cffi==2.7.2
Collecting psycopg2cffi==2.7.2
  Using cached psycopg2cffi-2.7.2.tar.gz
Requirement already up-to-date: six in /Volumes/UserSpace/Projects/beat/envpypy/site-packages (from psycopg2cffi==2.7.2)
Requirement already up-to-date: cffi>=1.0 in /Users/youknowone/.pyenv/versions/pypy-5.3/lib_pypy (from psycopg2cffi==2.7.2)
...

But trying to reinstalling 2.7.4 still requires cffi<1.0