Skip to content

Commit d83e80f

Browse files
authored
FAB: reuse ORM type hints from common-compat (apache#56903)
1 parent 8ffb7b1 commit d83e80f

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

providers/fab/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ license-files = ["NOTICE", "*/LICENSE*"]
5757
# After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
5858
dependencies = [
5959
"apache-airflow>=3.0.2",
60-
"apache-airflow-providers-common-compat>=1.2.1",
60+
"apache-airflow-providers-common-compat>=1.7.4", # + TODO: bump to next version
6161
# Blinker use for signals in Flask, this is an optional dependency in Flask 2.2 and lower.
6262
# In Flask 2.3 it becomes a mandatory dependency, and flask signals are always available.
6363
"blinker>=1.6.2; python_version < '3.13'",

providers/fab/src/airflow/providers/fab/auth_manager/models/__init__.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,7 @@
4343
from sqlalchemy.orm import Mapped, backref, declared_attr, relationship
4444

4545
from airflow.api_fastapi.auth.managers.models.base_user import BaseUser
46-
47-
try:
48-
from sqlalchemy.orm import mapped_column
49-
except ImportError:
50-
# fallback for SQLAlchemy < 2.0
51-
def mapped_column(*args, **kwargs):
52-
from sqlalchemy import Column
53-
54-
return Column(*args, **kwargs)
55-
46+
from airflow.providers.common.compat.sqlalchemy.orm import mapped_column
5647

5748
if TYPE_CHECKING:
5849
try:

0 commit comments

Comments
 (0)