From: Arc Riley Date: Tue, 17 Mar 2009 23:37:21 +0000 (+0000) Subject: Removed __builtin__ and buffer hack for MySQLdb for Py3 X-Git-Tag: rel_0_6_6~256 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9c853ab4f7907b9ebeac831496733cc83647870;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Removed __builtin__ and buffer hack for MySQLdb for Py3 --- 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):