From d5d6a1f4c725068120875c0cd3125262e1f067ae Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sun, 7 Apr 2013 02:37:55 +0100 Subject: [PATCH] Enable by default the range typecasters Otherwise it would have been enabled importing psycopg2.extras, which is a surprising behaviour. --- lib/extensions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/extensions.py b/lib/extensions.py index 8159a228..aa882be2 100644 --- a/lib/extensions.py +++ b/lib/extensions.py @@ -162,6 +162,10 @@ except ImportError: del register_default_json +# Create default Range typecasters +from psycopg2. _range import Range +del Range + # Add the "cleaned" version of the encodings to the key. # When the encoding is set its name is cleaned up from - and _ and turned # uppercase, so an encoding not respecting these rules wouldn't be found in the