Re: Problem with the default registration of the JSON adapter - Mailing list psycopg

From Federico Di Gregorio
Subject Re: Problem with the default registration of the JSON adapter
Date
Msg-id 51ECF589.8080103@dndg.it
Whole thread Raw
In response to Problem with the default registration of the JSON adapter  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Responses Re: Problem with the default registration of the JSON adapter  (Christophe Pettus <xof@thebuild.com>)
List psycopg
On 19/07/2013 20:41, Daniele Varrazzo wrote:
> I've taken in consideration the idea of dropping the automatic
> registration of the json adapter after giving a few months of warning,
> but thinking about that more coolly I think it would be a bad reaction.
> The feature was legitimately added on a major release (2.5) and if
> somebody finds it broken he can still install the last 2.4 available
> (pip install "psycopg2<2.5"). The right moment to think about a
> different behaviour (e.g. require register_json() to be called) is the
> next major release.

IMO, dropping authomatic registration in the next minor release and
having users explicitly calling register_json() is better. Having to
explicitly register a type caster always was the psycopg's way while
having to deregister it is counter-intuitive. I don't think there is a
whole legion of programmers out there already depending on the json
type-caster so it is much better to introduce the change now.

federico



psycopg by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: Getting adaped output from unicode text, without a connection
Next
From: "Hefferon, James S."
Date:
Subject: Re: Getting adaped output from unicode text, without a connection