From 0960c84d7941e30726dba895e986586866226b0b Mon Sep 17 00:00:00 2001 From: Pankaj Singh <98807258+pankajastro@users.noreply.github.com> Date: Tue, 7 May 2024 01:39:40 +0530 Subject: [PATCH] Remove condition import for SQLAlcRow (#2146) since airflow is pin to >2.7.0 remove conditional import https://github.com/astronomer/astro-sdk/blob/main/python-sdk/pyproject.toml#L20 --- python-sdk/src/astro/sql/operators/raw_sql.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/python-sdk/src/astro/sql/operators/raw_sql.py b/python-sdk/src/astro/sql/operators/raw_sql.py index 48b9dc21a..5c273e5a2 100644 --- a/python-sdk/src/astro/sql/operators/raw_sql.py +++ b/python-sdk/src/astro/sql/operators/raw_sql.py @@ -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