[pypy-dev] when will pypy support psycopg2?

Yan Chunlu springrider at gmail.com
Sun Jan 8 04:43:43 CET 2012


thanks for the help!  but it seems not resolved the problem. the error
message is about "PyByteArray_Type" etc.

not sure what to do with PyDateTime.

On Sat, Jan 7, 2012 at 10:06 PM, Amaury Forgeot d'Arc
<amauryfa at gmail.com> wrote:
> 2012/1/7 Maciej Fijalkowski <fijall at gmail.com>
>>
>> > I am curious that does it hard for pypy to add those data type?
>> > like PyByteArray_Type, PyMemoryView_Type and PyInterpreterState
>>
>> It's usually a painful experience to add new stuff to cpyext. But
>> also, it does not necesarilly give you confidence that it'll work,
>> since emulating CPython C API is tricky and tiny problems with
>> refcounts can lead to segfaults that don't occur on cpython for
>> obscure reasons.
>
>
> I looked at the compilation messages, and added the missing parts;
> it was not that difficult, after all :-)
>
> The module should now compile, provided you apply the attached patch to
> psycopg.
> (I suggested the PyDateTime_DELTA_GET_DAYS macros to CPython:
> http://bugs.python.org/issue13727 )
>
> The resulting module works a little... at least it yielded a meaningful
> error message:
>
> $ ./pypy-c -c "import psycopg2; conn = psycopg2.connect('dbname=test')"
> OperationalError: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
>
> --
> Amaury Forgeot d'Arc


More information about the pypy-dev mailing list