Re: Feature branches merged to master for 2.8 release

From: Federico Di Gregorio <fog(at)dndg(dot)it>
To: psycopg(at)lists(dot)postgresql(dot)org
Subject: Re: Feature branches merged to master for 2.8 release
Date: 2018-10-29 11:48:10
Message-ID: 67b7bfb4-0a44-b914-c61f-464e1385da13@dndg.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On 10/29/2018 11:54 AM, Karsten Hilbert wrote:
> 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.

Right.

federico

--
Federico Di Gregorio federico(dot)digregorio(at)dndg(dot)it
DNDG srl http://dndg.it
But not all bugs are an interesting challenge. Some are just a total
waste of my time, which usually is much more valuable than the time of
the submitter. -- Md

In response to

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2018-10-29 12:07:44 Re: Feature branches merged to master for 2.8 release
Previous Message Federico Di Gregorio 2018-10-29 11:47:50 Re: Feature branches merged to master for 2.8 release