Skip to content

Commit

Permalink
Remove condition import for SQLAlcRow (#2146)
Browse files Browse the repository at this point in the history
since airflow is pin to >2.7.0 remove conditional import 

https://github.com/astronomer/astro-sdk/blob/main/python-sdk/pyproject.toml#L20
  • Loading branch information
pankajastro authored May 6, 2024
1 parent 6b03bd4 commit 0960c84
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions python-sdk/src/astro/sql/operators/raw_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,10 @@
except ImportError: # pragma: no cover
from airflow.decorators import _TaskDecorator as TaskDecorator # type: ignore[attr-defined]

import airflow
import pandas as pd
from airflow.decorators.base import task_decorator_factory
from sqlalchemy.engine import ResultProxy

if airflow.__version__ >= "2.3":
from sqlalchemy.engine.row import LegacyRow as SQLAlcRow
else:
from sqlalchemy.engine.result import RowProxy as SQLAlcRow
from sqlalchemy.engine.row import LegacyRow as SQLAlcRow

from astro import settings
from astro.constants import RunRawSQLResultFormat
Expand Down

0 comments on commit 0960c84

Please sign in to comment.