Re: Feature branches merged to master for 2.8 release

Поиск
Список
Период
Сортировка
От Daniele Varrazzo
Тема Re: Feature branches merged to master for 2.8 release
Дата
Msg-id CA+mi_8bV4sq2HgAvMEx3ea6semu7g9pmwaW3gej4-peJHzO9Dg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Feature branches merged to master for 2.8 release  (Christian Ferrari <camauz@yahoo.com>)
Ответы Re: Feature branches merged to master for 2.8 release
Re: Feature branches merged to master for 2.8 release
Список psycopg
On Sun, Oct 28, 2018 at 9:35 PM Christian Ferrari <camauz@yahoo.com> wrote:
>
> Dear All,
> today I have released LIXA 1.7.1 with Python/Psycopg2 support.
> To avoid two different methods (get_native_connection() for PostgreSQL and _get_native_connection() for
MySQL/MariaDB)I have created a fork of Psycopg2 https://github.com/tiian/psycopg2/tree/get-native-connection with the
codeprovided by Federico and method "get_native_connection" renamed. 
> For the sake of convenience I have created a pull request: https://github.com/psycopg/psycopg2/pull/798 feel free to
integrateit or to go on with the process you figured out in the past. 
> Kind Regards
> Ch.F.

I don't know what Federico had decided but I'd very much prefer the
name without underscore. Methods with underscore don't belong to an
object interface.

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.

-- Daniele


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

Предыдущее
От: Christian Ferrari
Дата:
Сообщение: Re: Feature branches merged to master for 2.8 release
Следующее
От: Karsten Hilbert
Дата:
Сообщение: Re: Feature branches merged to master for 2.8 release