psycopg2.connect change from a C function to module method

Поиск
Список
Период
Сортировка
От Jan Urbański
Тема psycopg2.connect change from a C function to module method
Дата
Msg-id 4EF90375.30806@wulczer.org
обсуждение исходный текст
Ответы Re: psycopg2.connect change from a C function to module method  (Federico Di Gregorio <fog@dndg.it>)
Re: psycopg2.connect change from a C function to module method  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Список psycopg
Hi,

the change that made psycopg2.connect a module-level Python function
rather than a function exposed from a C module turned ou to be
backwards-incompatible.

Attached is a small snippet that works well with psycopg2 2.4.2 and
tracebacks with "TypeError: argument 1 must be string, not C" with 2.4.3.

The potential for actual breakage is very small, but I wanted to report
it in case someone hits it like I did and perhaps to discuss whether the
fix I applied is correct.

This was first reported to me by users of txpostgres, which got broken
by the connect() changes. The fix I applied is:

https://github.com/wulczer/txpostgres/commit/b9ffbbd72cff261da5d37d76a2c1e9f099848014

Cheers,
Jan


Вложения

В списке psycopg по дате отправления:

Предыдущее
От: Christopher David Howie
Дата:
Сообщение: Re: Rows from a stored procedure result are stringified
Следующее
От: Federico Di Gregorio
Дата:
Сообщение: Re: psycopg2.connect change from a C function to module method