mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-05-20 07:32:05 -04:00
Enable loading of external Firebird dialect, if available
Fixes: #5278
Change-Id: I1660abb11c02656fbf388f2f9c4257075111be58
(cherry picked from commit 8c5aa7d3e0)
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
.. change::
|
||||
:tags: change, firebird
|
||||
:tickets: 5278
|
||||
|
||||
Adjusted dialect loading for ``firebird://`` URIs so the external
|
||||
sqlalchemy-firebird dialect will be used if it has been installed,
|
||||
otherwise fall back to the (now deprecated) internal Firebird dialect.
|
||||
@@ -42,7 +42,14 @@ def _auto_fn(name):
|
||||
)
|
||||
dialect = translated
|
||||
try:
|
||||
module = __import__("sqlalchemy.dialects.%s" % (dialect,)).dialects
|
||||
if dialect == "firebird":
|
||||
try:
|
||||
module = __import__("sqlalchemy_firebird")
|
||||
dialect = "dialect"
|
||||
except:
|
||||
module = __import__("sqlalchemy.dialects.firebird").dialects
|
||||
else:
|
||||
module = __import__("sqlalchemy.dialects.%s" % (dialect,)).dialects
|
||||
except ImportError:
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user