summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/firebird.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-04-17 20:49:35 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-04-17 20:49:35 +0000
commitaabb6e530b05bee9cc5c2382a308a987abd6168e (patch)
treecd937947baf100d75e679e2f6d40e3a287ffc196 /lib/sqlalchemy/databases/firebird.py
parent8d7a271b8687dbcb58cac713f9e16e445d242881 (diff)
downloadsqlalchemy-aabb6e530b05bee9cc5c2382a308a987abd6168e.tar.gz
- the dialects within sqlalchemy.databases become a setuptools
entry points. loading the built-in database dialects works the same as always, but if none found will fall back to trying pkg_resources to load an external module [ticket:521]
Diffstat (limited to 'lib/sqlalchemy/databases/firebird.py')
-rw-r--r--lib/sqlalchemy/databases/firebird.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/sqlalchemy/databases/firebird.py b/lib/sqlalchemy/databases/firebird.py
index 2ab88101a..4695426eb 100644
--- a/lib/sqlalchemy/databases/firebird.py
+++ b/lib/sqlalchemy/databases/firebird.py
@@ -15,9 +15,6 @@ import sqlalchemy.ansisql as ansisql
import sqlalchemy.types as sqltypes
import sqlalchemy.exceptions as exceptions
-def dbapi():
- import kinterbasdb
- return kinterbasdb
_initialized_kb = False
@@ -113,6 +110,11 @@ class FBDialect(ansisql.ANSIDialect):
self.type_conv = type_conv
self.concurrency_level= concurrency_level
+ def dbapi(cls):
+ import kinterbasdb
+ return kinterbasdb
+ dbapi = classmethod(dbapi)
+
def create_connect_args(self, url):
opts = url.translate_connect_args(['host', 'database', 'user', 'password', 'port'])
if opts.get('port'):