Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gH61r-0005jP-Dq for psycopg@arkaria.postgresql.org; Mon, 29 Oct 2018 11:48:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gH61p-0006kL-QD for psycopg@arkaria.postgresql.org; Mon, 29 Oct 2018 11:48:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gH61p-0006kE-I9 for psycopg@lists.postgresql.org; Mon, 29 Oct 2018 11:48:17 +0000 Received: from mail.dndg.it ([178.32.136.2]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gH61l-00088F-Vj for psycopg@lists.postgresql.org; Mon, 29 Oct 2018 11:48:16 +0000 Received: from [10.94.33.108] (93-50-194-114.ip153.fastwebnet.it [93.50.194.114]) by mail.dndg.it (Postfix) with ESMTPSA id 0561FA0271 for ; Mon, 29 Oct 2018 11:53:49 +0000 (UTC) Subject: Re: Feature branches merged to master for 2.8 release To: psycopg@lists.postgresql.org References: <1878453370.14916776.1539604797985@mail.yahoo.com> <62b46b76-ce7f-6b89-b5ad-d0f2c2533432@dndg.it> <1820701010.20861820.1540152265403@mail.yahoo.com> <1390677301.27162879.1540762541620@mail.yahoo.com> <20181029105422.GD2262@hermes.hilbert.loc> From: Federico Di Gregorio Organization: DNDG srl Message-ID: <67b7bfb4-0a44-b914-c61f-464e1385da13@dndg.it> Date: Mon, 29 Oct 2018 12:48:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181029105422.GD2262@hermes.hilbert.loc> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: it-IT Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SURBL_BLOCKED, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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.digregorio@dndg.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