Commits

Anonymous committed 793218d

[svn] Adding exception should SA 0.4 be used with Beaker.

Comments (0)

Files changed (1)

beaker/ext/database.py

 except ImportError:
     raise InvalidCacheBackendError("Database cache backend requires the 'sqlalchemy' library")
 
+if not hasattr(sa, 'BoundMetaData'):
+    raise InvalidCacheBackendError("SQLAlchemy 0.4 and later are not currently supported.")
+
 class DatabaseNamespaceManager(NamespaceManager):
     metadatas = SyncDict(_threading.Lock(), {})
     tables = SyncDict(_threading.Lock(), {})