From 369810dff7d2e9d7371776f9dc58cedf5b794567 Mon Sep 17 00:00:00 2001 From: farcepest Date: Wed, 17 Oct 2012 18:30:19 -0400 Subject: PyPy fixes, and probably some reference issues for CPython too. Derived from a patch at https://bitbucket.org/pypy/compatibility/wiki/edit/mysql-python --- MySQLdb/converters.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'MySQLdb') diff --git a/MySQLdb/converters.py b/MySQLdb/converters.py index 14b1f52..953c4e5 100644 --- a/MySQLdb/converters.py +++ b/MySQLdb/converters.py @@ -48,6 +48,11 @@ except ImportError: import array +try: + ArrayType = array.ArrayType +except AttributeError: + ArrayType = array.array + try: set except NameError: @@ -133,7 +138,7 @@ conversions = { ListType: escape_sequence, DictType: escape_dict, InstanceType: Instance2Str, - array.ArrayType: array2Str, + ArrayType: array2Str, StringType: Thing2Literal, # default UnicodeType: Unicode2Str, ObjectType: Instance2Str, -- cgit v1.2.1