summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alembic/util/sqla_compat.py6
-rw-r--r--docs/build/unreleased/1196.rst7
2 files changed, 12 insertions, 1 deletions
diff --git a/alembic/util/sqla_compat.py b/alembic/util/sqla_compat.py
index 2cc070b..a767e7d 100644
--- a/alembic/util/sqla_compat.py
+++ b/alembic/util/sqla_compat.py
@@ -27,7 +27,6 @@ from sqlalchemy.sql.elements import ColumnClause
from sqlalchemy.sql.elements import quoted_name
from sqlalchemy.sql.elements import TextClause
from sqlalchemy.sql.elements import UnaryExpression
-from sqlalchemy.sql.naming import _NONE_NAME as _NONE_NAME
from sqlalchemy.sql.visitors import traverse
from typing_extensions import TypeGuard
@@ -66,6 +65,11 @@ sqla_14_26 = _vers >= (1, 4, 26)
sqla_2 = _vers >= (2,)
sqlalchemy_version = __version__
+try:
+ from sqlalchemy.sql.naming import _NONE_NAME as _NONE_NAME
+except ImportError:
+ from sqlalchemy.sql.elements import _NONE_NAME as _NONE_NAME # type: ignore # noqa: E501
+
if sqla_14:
# when future engine merges, this can be again based on version string
diff --git a/docs/build/unreleased/1196.rst b/docs/build/unreleased/1196.rst
new file mode 100644
index 0000000..a0f0e60
--- /dev/null
+++ b/docs/build/unreleased/1196.rst
@@ -0,0 +1,7 @@
+.. change::
+ :tags: bug, ops
+ :tickets: 1196
+
+ Fixed regression where Alembic would not run with older SQLAlchemy 1.3
+ versions prior to 1.3.24 due to a missing symbol. Workarounds have been
+ applied for older 1.3 versions.