Author: cito
Date: Thu Jan 21 08:04:52 2016
New Revision: 773

Log:
Do not call set_decimal in pgdb

The set_decimal() function is only relevant for the pg module (its getresult() 
method).
Don't call it in the pgdb module; the two modules should not interfere with 
each other.

Modified:
   branches/4.x/pgdb.py
   trunk/pgdb.py

Modified: branches/4.x/pgdb.py
==============================================================================
--- branches/4.x/pgdb.py        Wed Jan 20 17:44:20 2016        (r772)
+++ branches/4.x/pgdb.py        Thu Jan 21 08:04:52 2016        (r773)
@@ -72,7 +72,6 @@
 from time import localtime
 try:
     from decimal import Decimal
-    set_decimal(Decimal)
 except ImportError:  # Python < 2.4, unsupported
     Decimal = float  # use float instead of Decimal
 try:
@@ -113,7 +112,6 @@
     global Decimal
     if decimal_type is not None:
         _cast['numeric'] = Decimal = decimal_type
-        set_decimal(Decimal)
     return Decimal
 
 

Modified: trunk/pgdb.py
==============================================================================
--- trunk/pgdb.py       Wed Jan 20 17:44:20 2016        (r772)
+++ trunk/pgdb.py       Thu Jan 21 08:04:52 2016        (r773)
@@ -98,8 +98,6 @@
         def OrderedDict(*args):
             raise NotSupportedError('OrderedDict is not supported')
 
-set_decimal(Decimal)
-
 
 ### Module Constants
 
@@ -124,7 +122,6 @@
     global Decimal
     if decimal_type is not None:
         _cast['numeric'] = Decimal = decimal_type
-        set_decimal(Decimal)
     return Decimal
 
 
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql

Reply via email to