Re: [snafu] isolation-level change in 2.4.2

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Marko Kreen <markokr(at)gmail(dot)com>
Cc: Federico Di Gregorio <fog(at)dndg(dot)it>, psycopg(at)postgresql(dot)org
Subject: Re: [snafu] isolation-level change in 2.4.2
Date: 2011-12-14 22:00:50
Message-ID: CA+mi_8YtBO9H9f5D+Du9_3ScYkbYKtbjwngw9cvCeF07R2vYMQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Wed, Dec 14, 2011 at 7:28 PM, Marko Kreen <markokr(at)gmail(dot)com> wrote:

Marko, I've noted just now the "snafu" in the title: do you have
anything to complain about? Please make an explicit list of your
points because - but it may be just me not understanding the
subtleties of the English language - I feel your tone in this thread a
little bit on the unpleasant side.

> On Wed, Dec 14, 2011 at 6:15 PM, Daniele Varrazzo
> <daniele(dot)varrazzo(at)gmail(dot)com> wrote:
>> The only widespread use of a numeric value I've seen (including many
>> official psycopg2 examples) is for autocommit=0, so when I've changed
>> the values I've cared to keep that value stable only.
>
> Please remove any kind of usage of plain ints from psycopg
> test and example code, if you really want discourage such use.
>
> db.set_isolation_level(0) quite strongly hints that other
> numeric usage is valid too.

You can choose whether to write your code by induction over examples
or by reading the documentation. The constants have been there for
more than 6 years and are the only usage explicitly documented.

> Esp. note the usage in lib/psycopg1.py that was not updated
> with your previous changes.

Right: psycopg1.py is not maintained, not documented and hasn't got a
single test. Fog: shall we fix it or drop it?

-- Daniele,

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Adrian Klaver 2011-12-14 22:19:16 Re: [snafu] isolation-level change in 2.4.2
Previous Message Marko Kreen 2011-12-14 19:28:58 Re: [snafu] isolation-level change in 2.4.2