From: Jonathan Ellis Date: Tue, 15 Aug 2006 16:26:20 +0000 (+0000) Subject: fixes for threadless python compiles X-Git-Tag: rel_0_2_8~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78a369ac3a3a2197ddd700f8bc31fab3e2e7d1f7;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git fixes for threadless python compiles --- diff --git a/lib/sqlalchemy/pool.py b/lib/sqlalchemy/pool.py index 6b96d88ead..f601dd9a2c 100644 --- a/lib/sqlalchemy/pool.py +++ b/lib/sqlalchemy/pool.py @@ -17,7 +17,7 @@ import sqlalchemy.queue as Queue try: import thread except: - import dummythread as thread + import dummy_thread as thread proxies = {} diff --git a/lib/sqlalchemy/util.py b/lib/sqlalchemy/util.py index 1c69f06c9c..1778966d4b 100644 --- a/lib/sqlalchemy/util.py +++ b/lib/sqlalchemy/util.py @@ -4,7 +4,13 @@ # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php -import thread, threading, weakref, UserList, time, string, inspect, sys, sets +import weakref, UserList, time, string, inspect, sys, sets +try: + import thread, threading +except ImportError: + import dummy_thread as thread + import dummy_threading as threading + from exceptions import * import __builtin__ @@ -296,4 +302,4 @@ def constructor_args(instance, **kwargs): raise AssertionError("instance has no attribute '%s'" % arg) return newparams - \ No newline at end of file +