vincbeck commented on code in PR #55954:
URL: https://github.com/apache/airflow/pull/55954#discussion_r2379095709
##########
airflow-core/src/airflow/models/backfill.py:
##########
@@ -39,7 +38,18 @@
select,
)
from sqlalchemy.exc import IntegrityError
-from sqlalchemy.orm import relationship, validates
+
+try:
+ from sqlalchemy.orm import mapped_column
+except ImportError:
+ # fallback for SQLAlchemy < 2.0
+ def mapped_column(*args, **kwargs):
+ from sqlalchemy import Column
+
+ return Column(*args, **kwargs)
Review Comment:
I am happy to do it but this code is also temporary, this is a transition
until we migrate fully to SQLA2. Once the migration done, I'll create another
PR to simply import from `from sqlalchemy.orm import mapped_column`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]