Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gC1jD-00066h-Fj for psycopg@arkaria.postgresql.org; Mon, 15 Oct 2018 12:12:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gC1jB-0000Xp-7j for psycopg@arkaria.postgresql.org; Mon, 15 Oct 2018 12:12:05 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gC1jA-0000Xi-Vh; Mon, 15 Oct 2018 12:12:05 +0000 Received: from mout.gmx.net ([212.227.15.18]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gC1j7-0006WW-WA; Mon, 15 Oct 2018 12:12:03 +0000 Received: from hermes ([84.165.108.133]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lm34j-1fcy5c16Qb-00ZfgC; Mon, 15 Oct 2018 14:11:57 +0200 Received: from hermes ([84.165.108.133]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lm34j-1fcy5c16Qb-00ZfgC; Mon, 15 Oct 2018 14:11:57 +0200 Received: from ncq by hermes with local (Exim 4.91) (envelope-from ) id 1gC1j1-0000Jy-7p; Mon, 15 Oct 2018 14:11:55 +0200 Date: Mon, 15 Oct 2018 14:11:55 +0200 From: Karsten Hilbert To: psycopg@lists.postgresql.org, psycopg@postgresql.org Subject: Re: Feature branches merged to master for 2.8 release Message-ID: <20181015121154.GC2008@hermes.hilbert.loc> Mail-Followup-To: psycopg@lists.postgresql.org, psycopg@postgresql.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Ma_X_il-Followup-to: d Re_X_turn-receipt-to: Karsten.Hilbert@gmx.net Di_X_sposition-Notification-To: Karsten.Hilbert@gmx.net X-Confi_X_rm-Reading-To: Karsten.Hilbert@gmx.net X-Pri_X_ority: 2 (High) User-Agent: Mutt/1.10.1 (2018-07-13) Sender: X-Provags-ID: V03:K1:s/gy0DZ86uGeZkQ9jx67mzmGYRGptU4wJc3snIIFD5HbyohHVXo s3acOCi8HFcBkxuFg3VVEdm1y9744OIS/PTObiNdL/CE2Cfky2itSyuX7GTUeHMkRMWJq2P Rx5yTVzN9KF2EHcabMM/5FCHu81DkX2bkskdgPBfIJWlSqQgoVl/fXKA0niIHhYJfsHXfAo MH+1CKwgZR3/aZV8T0rsg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:EOfqV4X5KVM=:pcQ7akjDCXqf/P2lMVRdcP UWWdJ2pd3Wi7cEeoFyGrPEVXeeND+iQUcVA5nCXMU+GKGVSuBII7RvS9DzKAIASFc7WYJODIk O/L03T8jcx3U+/Fq7w3PjgxBPZLINAfacKXfURt+HH/wuZHfn1GsI5HTsSpkzGf3g+Xn08J/d pEs6chQoA4+e656ybI/2RNLk7PCKYb2X7+AJ1IKNA70tc6uSWJmOZPqxNrPcDvRvsL1nm0/RK uFKHx6YHoPbdbVrgBCODX74SuENu+nowqEBFJMZX6vQ5xZePgKhtwPAQkdnJWkT2p/ztSUTtc RKHGLndRo6Sebc68xKUm5hlFhpVxG5X/k9ILz8cWgixDx5aZppPJu1gY5BzEYEl8ue3pS7P6A 0VKcDKjN+E9jsHBxhtl5ErDwXYQxHdLc5fo685JMTobTOQplhmIiF3rp4WzRsq5ZxZY137J2o Z1V1odKrrleoYyEND8xefb//HM0NGdJjxIMhj7AS55D52owUF3FIR2yvBD1gM19VZQDZSE5Lh zTeUcW+JRPauhK8g/gTgt1SMsPv8555+jmNkKDkwsklUlNegAsWgVzoy8Y40cDxT4IyHJ8rJu j9dxqXTxSj9jA7irh1V/MFOia5/GcIqUuJmfUZ7K2OvXxyxWsogV1C5WuBTHWqeAqD4TrLEnQ cJQKHu4LWpg+2BuAAcXWpeJyvmHly7Mx9J51GTBRQirgBdVXrpj+/RV3PkvzcfYrMELN/tcrd fJAwh34Tj0t+1t9P/hhlmmS+0WEpRARhyb9So1iKgsEtmwnNNJNy7fDIWkK9EcsSmZDLmmlAY +M66zGddSCR7Bp84VW872OKEjCEfg== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Oct 15, 2018 at 12:48:04PM +0100, Daniele Varrazzo wrote: > - the new 'errors' module. About it I have a doubt: we convert > postgres error messages [2] from lower_case to CamelCase because the > latter is the convention for Python class, but maybe leaving as they > are makes more sense? Easier to google for them or grep for them in > the postgres sources maybe? Since there is no Right or Wrong here, the "best" option might be to offer both: Raise whatever is Right for Python (that is, CamelCase) raise PostgresSpecificError but support catching lower case, too: class postgres_specific_error(PostgresSpecificError): pass try: something() except postgres_specific_error: print('lower case') For the lower case one I would exactly copy what's used by PostgreSQL itself. Make sense ? Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B