diff --git a/providers/yandex/pyproject.toml b/providers/yandex/pyproject.toml index c8e376af9a5da..a7d69bfdc8d5a 100644 --- a/providers/yandex/pyproject.toml +++ b/providers/yandex/pyproject.toml @@ -60,7 +60,7 @@ dependencies = [ "apache-airflow>=2.11.0", "yandexcloud>=0.308.0; python_version < '3.13'", "yandex-query-client>=0.1.4; python_version < '3.13'", - "apache-airflow-providers-common-compat>=1.8.0", + "apache-airflow-providers-common-compat>=1.8.0", # use next version ] # The optional dependencies should be modified in place in the generated file diff --git a/providers/yandex/src/airflow/providers/yandex/utils/user_agent.py b/providers/yandex/src/airflow/providers/yandex/utils/user_agent.py index 08bb8e467f112..1c5028078f5d9 100644 --- a/providers/yandex/src/airflow/providers/yandex/utils/user_agent.py +++ b/providers/yandex/src/airflow/providers/yandex/utils/user_agent.py @@ -24,7 +24,7 @@ def provider_user_agent() -> str | None: """Construct User-Agent from Airflow core & provider package versions.""" from airflow import __version__ as airflow_version - from airflow.configuration import conf + from airflow.providers.common.compat.sdk import conf from airflow.providers_manager import ProvidersManager try: diff --git a/providers/yandex/tests/unit/yandex/utils/test_user_agent.py b/providers/yandex/tests/unit/yandex/utils/test_user_agent.py index 58cd4d3ed3968..0fd20f85d1187 100644 --- a/providers/yandex/tests/unit/yandex/utils/test_user_agent.py +++ b/providers/yandex/tests/unit/yandex/utils/test_user_agent.py @@ -41,7 +41,7 @@ def test_provider_user_agent(): user_agent_provider = f"{provider_name}/{provider.version}" assert user_agent_provider in user_agent - from airflow.configuration import conf + from airflow.providers.common.compat.sdk import conf user_agent_prefix = conf.get("yandex", "sdk_user_agent_prefix", fallback="") assert user_agent_prefix in user_agent