Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions providers/common/sql/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ requires-python = ">=3.10"
# After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
dependencies = [
"apache-airflow>=2.10.0",
"apache-airflow-providers-common-compat>=1.8.0",
"sqlparse>=0.5.1",
"more-itertools>=9.0.0",
# The methodtools dependency is necessary since the introduction of dialects:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,10 @@
from polars import DataFrame as PolarsDataFrame
from sqlalchemy.engine import URL, Engine, Inspector

from airflow.providers.common.compat.sdk import Connection
from airflow.providers.openlineage.extractors import OperatorLineage
from airflow.providers.openlineage.sqlparser import DatabaseInfo

try:
from airflow.sdk import Connection
except ImportError:
from airflow.models.connection import Connection # type: ignore[assignment]


T = TypeVar("T")
SQL_PLACEHOLDERS = frozenset({"%s", "?"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@
if TYPE_CHECKING:
import jinja2

try:
from airflow.sdk.definitions.context import Context
except ImportError:
# TODO: Remove once provider drops support for Airflow 2
from airflow.utils.context import Context
from airflow.providers.common.compat.sdk import Context


class GenericTransfer(BaseOperator):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
if TYPE_CHECKING:
import jinja2

from airflow.providers.common.compat.sdk import Context
from airflow.providers.openlineage.extractors import OperatorLineage
from airflow.utils.context import Context


def _convert_to_float_if_possible(s: str) -> float | str:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from airflow.providers.common.sql.hooks.sql import DbApiHook

if TYPE_CHECKING:
from airflow.utils.context import Context
from airflow.providers.common.compat.sdk import Context


class SqlSensor(BaseSensorOperator):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,7 @@ from typing import Any

from _typeshed import Incomplete as Incomplete

from airflow.providers.common.sql.version_compat import AIRFLOW_V_3_0_PLUS

if AIRFLOW_V_3_0_PLUS:
from airflow.sdk import BaseSensorOperator
else:
from airflow.sensors.base import BaseSensorOperator # type: ignore[no-redef]

from airflow.providers.common.compat.sdk import BaseSensorOperator
from airflow.utils.context import Context as Context

class SqlSensor(BaseSensorOperator):
Expand Down