Psycopg2: Mention psycopg2cffi for PyPy

Created on 22 May 2019  路  6Comments  路  Source: psycopg/psycopg2

On PyPy, psycopg2cffi is faster. Would a PR to mention this in the FAQ or elsewhere in the documentation be acceptable?

Most helpful comment

I am a PyPy core dev, and would like to "spread the word". Thanks for being open to the idea of mentioning it. I will try to do what you suggest, if it works out I will open a new issue with more info.

All 6 comments

Are you one of the project maintainers? If so I'd rather check if the project is really in line with psycopg2 before endorsing it.

Several years ago I helped maintaining the project (when it was still a ctypes porting) and brought it to feature parity with psycopg 2.5. Now I see it's in version 2.8.1 released 31 July 2018 but from the log I don't think it's fully compatible with psycopg 2.8.

Incidentally psycopg is now 2.8.2 and soon will be 2.8.3. If the authors feel like bringing it to feature parity with 2.8 (which means dropping in the psycopg test suite and hammer the codebase until it passes) I'm happy to mention it.

I am a PyPy core dev, and would like to "spread the word". Thanks for being open to the idea of mentioning it. I will try to do what you suggest, if it works out I will open a new issue with more info.

I believe psycopg2-binary works with latest PyPy 3.6 ( http://buildbot.pypy.org/nightly/py3.6/pypy-c-jit-98576-73d20edb41e9-linux64.tar.bz2, build from 2020-01-24 ). I just played with it, did some queries, and it worked.

@mattip Do you have a sense of how much faster psycopg2cffi is than psycopg2-binary when running under PyPy?

No. I don鈥檛 think I ever got around to trying it out seriously.

We use PyPy for a Django web application, but it is a little concerning that psycopg2cffi is not well maintained since it's the defacto choice for PyPy. Not sure what to do about that but potentially switch back to psycopg2-binary if it works, but I guess we'll need to check for performance regressions.

Was this page helpful?
0 / 5 - 0 ratings