From f9c853ab4f7907b9ebeac831496733cc83647870 Mon Sep 17 00:00:00 2001 From: Arc Riley Date: Tue, 17 Mar 2009 23:37:21 +0000 Subject: [PATCH] Removed __builtin__ and buffer hack for MySQLdb for Py3 --- lib/sqlalchemy/util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/sqlalchemy/util.py b/lib/sqlalchemy/util.py index aeafb76475..8ea8c36dd8 100644 --- a/lib/sqlalchemy/util.py +++ b/lib/sqlalchemy/util.py @@ -5,7 +5,9 @@ # the MIT License: http://www.opensource.org/licenses/mit-license.php import inspect, itertools, operator, sys, warnings, weakref +# Py2K import __builtin__ +# end Py2K types = __import__('types') from sqlalchemy import exc @@ -51,11 +53,13 @@ else: except ImportError: import pickle +# Py2K # a controversial feature, required by MySQLdb currently def buffer(x): return x buffer = getattr(__builtin__, 'buffer', buffer) +# end Py2K if sys.version_info >= (2, 5): class PopulateDict(dict): -- 2.47.3