diff options
author | farcepest <farcepest@gmail.com> | 2012-10-17 18:30:19 -0400 |
---|---|---|
committer | farcepest <farcepest@gmail.com> | 2012-10-17 18:30:19 -0400 |
commit | 369810dff7d2e9d7371776f9dc58cedf5b794567 (patch) | |
tree | ce854a998ea449cef7acb900d83d3c0f6935b892 /MySQLdb | |
parent | c9b282f8b5f7595e7dc3c92b8964a423ba0fabdb (diff) | |
download | mysqldb1-369810dff7d2e9d7371776f9dc58cedf5b794567.tar.gz |
PyPy fixes, and probably some reference issues for CPython too.
Derived from a patch at https://bitbucket.org/pypy/compatibility/wiki/edit/mysql-python
Diffstat (limited to 'MySQLdb')
-rw-r--r-- | MySQLdb/converters.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/MySQLdb/converters.py b/MySQLdb/converters.py index 14b1f52..953c4e5 100644 --- a/MySQLdb/converters.py +++ b/MySQLdb/converters.py @@ -49,6 +49,11 @@ except ImportError: import array try: + ArrayType = array.ArrayType +except AttributeError: + ArrayType = array.array + +try: set except NameError: from sets import Set as set @@ -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, |