Re: Feature branches merged to master for 2.8 release

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема Re: Feature branches merged to master for 2.8 release
Дата
Msg-id 20181029105422.GD2262@hermes.hilbert.loc
обсуждение исходный текст
Ответ на Re: Feature branches merged to master for 2.8 release  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Ответы Re: Feature branches merged to master for 2.8 release
Re: Feature branches merged to master for 2.8 release
Список psycopg
On Mon, Oct 29, 2018 at 10:49:14AM +0000, Daniele Varrazzo wrote:

> There are always differences, in interfaces and in behaviour, between
> dbapi drivers. A private method, returning two objects which are
> different because they are very simply two database drivers, are not
> the place where to start trying to unify interfaces. What you do, if
> you want to deal with both drivers, is to write a wrapper unifying the
> interfaces. I would be ok to adapt other drivers choices, if I agreed
> with them, but I can't agree with an underscore method being
> documented as part of the API: that's internal stuff and totally not
> idiomatic Python.
> 
> My vote goes to have this method name without underscore, but I'll
> leave the final decision to Federico.

Apart from a wrapper class one can always monkey-patch

    my_dbapi_instance._get_native_connection = my_dbapi_instance.get_native_connection

at runtime.

Karsten
-- 
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B


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

Предыдущее
От: Daniele Varrazzo
Дата:
Сообщение: Re: Feature branches merged to master for 2.8 release
Следующее
От: Federico Di Gregorio
Дата:
Сообщение: Re: Feature branches merged to master for 2.8 release