From 78a369ac3a3a2197ddd700f8bc31fab3e2e7d1f7 Mon Sep 17 00:00:00 2001 From: Jonathan Ellis Date: Tue, 15 Aug 2006 16:26:20 +0000 Subject: [PATCH] fixes for threadless python compiles --- lib/sqlalchemy/pool.py | 2 +- lib/sqlalchemy/util.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) 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 + -- 2.47.2