apache-airflow-providers-yandex 4.1.0__py3-none-any.whl → 4.1.1rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- airflow/providers/yandex/__init__.py +1 -1
- airflow/providers/yandex/hooks/yandex.py +5 -1
- airflow/providers/yandex/links/yq.py +5 -18
- airflow/providers/yandex/operators/dataproc.py +2 -6
- airflow/providers/yandex/operators/yq.py +3 -7
- airflow/providers/yandex/version_compat.py +48 -0
- {apache_airflow_providers_yandex-4.1.0.dist-info → apache_airflow_providers_yandex-4.1.1rc1.dist-info}/METADATA +9 -10
- {apache_airflow_providers_yandex-4.1.0.dist-info → apache_airflow_providers_yandex-4.1.1rc1.dist-info}/RECORD +10 -9
- {apache_airflow_providers_yandex-4.1.0.dist-info → apache_airflow_providers_yandex-4.1.1rc1.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_yandex-4.1.0.dist-info → apache_airflow_providers_yandex-4.1.1rc1.dist-info}/entry_points.txt +0 -0
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
29
29
|
|
30
30
|
__all__ = ["__version__"]
|
31
31
|
|
32
|
-
__version__ = "4.1.
|
32
|
+
__version__ = "4.1.1"
|
33
33
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
35
35
|
"2.10.0"
|
@@ -20,7 +20,6 @@ from typing import Any
|
|
20
20
|
|
21
21
|
import yandexcloud
|
22
22
|
|
23
|
-
from airflow.hooks.base import BaseHook
|
24
23
|
from airflow.providers.yandex.utils.credentials import (
|
25
24
|
CredentialsType,
|
26
25
|
get_credentials,
|
@@ -30,6 +29,11 @@ from airflow.providers.yandex.utils.defaults import conn_name_attr, conn_type, d
|
|
30
29
|
from airflow.providers.yandex.utils.fields import get_field_from_extras
|
31
30
|
from airflow.providers.yandex.utils.user_agent import provider_user_agent
|
32
31
|
|
32
|
+
try:
|
33
|
+
from airflow.sdk import BaseHook
|
34
|
+
except ImportError:
|
35
|
+
from airflow.hooks.base import BaseHook # type: ignore[attr-defined,no-redef]
|
36
|
+
|
33
37
|
|
34
38
|
class YandexCloudBaseHook(BaseHook):
|
35
39
|
"""
|
@@ -18,24 +18,11 @@ from __future__ import annotations
|
|
18
18
|
|
19
19
|
from typing import TYPE_CHECKING
|
20
20
|
|
21
|
+
from airflow.providers.yandex.version_compat import BaseOperatorLink, XCom
|
22
|
+
|
21
23
|
if TYPE_CHECKING:
|
22
|
-
from airflow.models import BaseOperator
|
23
24
|
from airflow.models.taskinstancekey import TaskInstanceKey
|
24
|
-
|
25
|
-
try:
|
26
|
-
from airflow.sdk.definitions.context import Context
|
27
|
-
except ImportError:
|
28
|
-
# TODO: Remove once provider drops support for Airflow 2
|
29
|
-
from airflow.utils.context import Context
|
30
|
-
|
31
|
-
from airflow.providers.common.compat.version_compat import AIRFLOW_V_3_0_PLUS
|
32
|
-
|
33
|
-
if AIRFLOW_V_3_0_PLUS:
|
34
|
-
from airflow.sdk import BaseOperatorLink
|
35
|
-
from airflow.sdk.execution_time.xcom import XCom
|
36
|
-
else:
|
37
|
-
from airflow.models import XCom # type: ignore[no-redef]
|
38
|
-
from airflow.models.baseoperatorlink import BaseOperatorLink # type: ignore[no-redef]
|
25
|
+
from airflow.providers.yandex.version_compat import BaseOperator, Context
|
39
26
|
|
40
27
|
XCOM_WEBLINK_KEY = "web_link"
|
41
28
|
|
@@ -49,5 +36,5 @@ class YQLink(BaseOperatorLink):
|
|
49
36
|
return XCom.get_value(key=XCOM_WEBLINK_KEY, ti_key=ti_key) or "https://yq.cloud.yandex.ru"
|
50
37
|
|
51
38
|
@staticmethod
|
52
|
-
def persist(context: Context,
|
53
|
-
|
39
|
+
def persist(context: Context, web_link: str) -> None:
|
40
|
+
context["ti"].xcom_push(key=XCOM_WEBLINK_KEY, value=web_link)
|
@@ -20,15 +20,11 @@ from collections.abc import Iterable, Sequence
|
|
20
20
|
from dataclasses import dataclass
|
21
21
|
from typing import TYPE_CHECKING
|
22
22
|
|
23
|
-
from airflow.models import BaseOperator
|
24
23
|
from airflow.providers.yandex.hooks.dataproc import DataprocHook
|
24
|
+
from airflow.providers.yandex.version_compat import BaseOperator
|
25
25
|
|
26
26
|
if TYPE_CHECKING:
|
27
|
-
|
28
|
-
from airflow.sdk.definitions.context import Context
|
29
|
-
except ImportError:
|
30
|
-
# TODO: Remove once provider drops support for Airflow 2
|
31
|
-
from airflow.utils.context import Context
|
27
|
+
from airflow.providers.yandex.version_compat import Context
|
32
28
|
|
33
29
|
|
34
30
|
@dataclass
|
@@ -20,16 +20,12 @@ from collections.abc import Sequence
|
|
20
20
|
from functools import cached_property
|
21
21
|
from typing import TYPE_CHECKING, Any
|
22
22
|
|
23
|
-
from airflow.models import BaseOperator
|
24
23
|
from airflow.providers.yandex.hooks.yq import YQHook
|
25
24
|
from airflow.providers.yandex.links.yq import YQLink
|
25
|
+
from airflow.providers.yandex.version_compat import BaseOperator
|
26
26
|
|
27
27
|
if TYPE_CHECKING:
|
28
|
-
|
29
|
-
from airflow.sdk.definitions.context import Context
|
30
|
-
except ImportError:
|
31
|
-
# TODO: Remove once provider drops support for Airflow 2
|
32
|
-
from airflow.utils.context import Context
|
28
|
+
from airflow.providers.yandex.version_compat import Context
|
33
29
|
|
34
30
|
|
35
31
|
class YQExecuteQueryOperator(BaseOperator):
|
@@ -84,7 +80,7 @@ class YQExecuteQueryOperator(BaseOperator):
|
|
84
80
|
|
85
81
|
# pass to YQLink
|
86
82
|
web_link = self.hook.compose_query_web_link(self.query_id)
|
87
|
-
YQLink.persist(context,
|
83
|
+
YQLink.persist(context, web_link)
|
88
84
|
|
89
85
|
results = self.hook.wait_results(self.query_id)
|
90
86
|
# forget query to avoid 'stop_query' in on_kill
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# Licensed to the Apache Software Foundation (ASF) under one
|
2
|
+
# or more contributor license agreements. See the NOTICE file
|
3
|
+
# distributed with this work for additional information
|
4
|
+
# regarding copyright ownership. The ASF licenses this file
|
5
|
+
# to you under the Apache License, Version 2.0 (the
|
6
|
+
# "License"); you may not use this file except in compliance
|
7
|
+
# with the License. You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
|
18
|
+
from __future__ import annotations
|
19
|
+
|
20
|
+
|
21
|
+
def get_base_airflow_version_tuple() -> tuple[int, int, int]:
|
22
|
+
from packaging.version import Version
|
23
|
+
|
24
|
+
from airflow import __version__
|
25
|
+
|
26
|
+
airflow_version = Version(__version__)
|
27
|
+
return airflow_version.major, airflow_version.minor, airflow_version.micro
|
28
|
+
|
29
|
+
|
30
|
+
AIRFLOW_V_3_0_PLUS = get_base_airflow_version_tuple() >= (3, 0, 0)
|
31
|
+
|
32
|
+
if AIRFLOW_V_3_0_PLUS:
|
33
|
+
from airflow.sdk import BaseOperator, BaseOperatorLink
|
34
|
+
from airflow.sdk.definitions.context import Context
|
35
|
+
from airflow.sdk.execution_time.xcom import XCom
|
36
|
+
else:
|
37
|
+
from airflow.models import BaseOperator, XCom
|
38
|
+
from airflow.models.baseoperatorlink import BaseOperatorLink # type: ignore[no-redef]
|
39
|
+
from airflow.utils.context import Context
|
40
|
+
|
41
|
+
|
42
|
+
__all__ = [
|
43
|
+
"AIRFLOW_V_3_0_PLUS",
|
44
|
+
"BaseOperator",
|
45
|
+
"BaseOperatorLink",
|
46
|
+
"Context",
|
47
|
+
"XCom",
|
48
|
+
]
|
@@ -1,11 +1,11 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: apache-airflow-providers-yandex
|
3
|
-
Version: 4.1.
|
3
|
+
Version: 4.1.1rc1
|
4
4
|
Summary: Provider package apache-airflow-providers-yandex for Apache Airflow
|
5
5
|
Keywords: airflow-provider,yandex,airflow,integration
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
7
7
|
Maintainer-email: Apache Software Foundation <dev@airflow.apache.org>
|
8
|
-
Requires-Python: ~=3.
|
8
|
+
Requires-Python: ~=3.10
|
9
9
|
Description-Content-Type: text/x-rst
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
11
11
|
Classifier: Environment :: Console
|
@@ -15,18 +15,17 @@ Classifier: Intended Audience :: System Administrators
|
|
15
15
|
Classifier: Framework :: Apache Airflow
|
16
16
|
Classifier: Framework :: Apache Airflow :: Provider
|
17
17
|
Classifier: License :: OSI Approved :: Apache Software License
|
18
|
-
Classifier: Programming Language :: Python :: 3.9
|
19
18
|
Classifier: Programming Language :: Python :: 3.10
|
20
19
|
Classifier: Programming Language :: Python :: 3.11
|
21
20
|
Classifier: Programming Language :: Python :: 3.12
|
22
21
|
Classifier: Topic :: System :: Monitoring
|
23
|
-
Requires-Dist: apache-airflow>=2.10.
|
22
|
+
Requires-Dist: apache-airflow>=2.10.0rc1
|
24
23
|
Requires-Dist: yandexcloud>=0.308.0
|
25
24
|
Requires-Dist: yandex-query-client>=0.1.4
|
26
25
|
Requires-Dist: apache-airflow-providers-common-compat ; extra == "common-compat"
|
27
26
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
28
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-yandex/4.1.
|
29
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-yandex/4.1.
|
27
|
+
Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-yandex/4.1.1/changelog.html
|
28
|
+
Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-yandex/4.1.1
|
30
29
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
31
30
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
32
31
|
Project-URL: Source Code, https://github.com/apache/airflow
|
@@ -58,7 +57,7 @@ Provides-Extra: common-compat
|
|
58
57
|
|
59
58
|
Package ``apache-airflow-providers-yandex``
|
60
59
|
|
61
|
-
Release: ``4.1.
|
60
|
+
Release: ``4.1.1``
|
62
61
|
|
63
62
|
|
64
63
|
This package is for Yandex, including:
|
@@ -73,7 +72,7 @@ This is a provider package for ``yandex`` provider. All classes for this provide
|
|
73
72
|
are in ``airflow.providers.yandex`` python package.
|
74
73
|
|
75
74
|
You can find package information and changelog for the provider
|
76
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-yandex/4.1.
|
75
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-yandex/4.1.1/>`_.
|
77
76
|
|
78
77
|
Installation
|
79
78
|
------------
|
@@ -82,7 +81,7 @@ You can install this package on top of an existing Airflow 2 installation (see `
|
|
82
81
|
for the minimum Airflow version supported) via
|
83
82
|
``pip install apache-airflow-providers-yandex``
|
84
83
|
|
85
|
-
The package supports the following python versions: 3.
|
84
|
+
The package supports the following python versions: 3.10,3.11,3.12
|
86
85
|
|
87
86
|
Requirements
|
88
87
|
------------
|
@@ -115,5 +114,5 @@ Dependent package
|
|
115
114
|
================================================================================================================== =================
|
116
115
|
|
117
116
|
The changelog for the provider package can be found in the
|
118
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-yandex/4.1.
|
117
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-yandex/4.1.1/changelog.html>`_.
|
119
118
|
|
@@ -1,15 +1,16 @@
|
|
1
1
|
airflow/providers/yandex/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
|
2
|
-
airflow/providers/yandex/__init__.py,sha256=
|
2
|
+
airflow/providers/yandex/__init__.py,sha256=67ndbApW7fBf1vwhVnXolKf9bnWuQLAZoa8nAswC2pg,1495
|
3
3
|
airflow/providers/yandex/get_provider_info.py,sha256=eihBGmOy9ljwxZQLES-Fi0RdSKWGze07VtFBRUITLP0,4015
|
4
|
+
airflow/providers/yandex/version_compat.py,sha256=6IDC7JAL1RaxOlEouNZTzv2fHP8a7yiBBw3nPDucBrA,1654
|
4
5
|
airflow/providers/yandex/hooks/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
5
6
|
airflow/providers/yandex/hooks/dataproc.py,sha256=8ykGvlZUAjAKHpypiOYcWVJk7u-WNjfEohuyOy1Okss,1944
|
6
|
-
airflow/providers/yandex/hooks/yandex.py,sha256=
|
7
|
+
airflow/providers/yandex/hooks/yandex.py,sha256=YmcA7fUfdWlAWHN52C44rvictxSF9jBB1Dc1Sg7FgGA,6540
|
7
8
|
airflow/providers/yandex/hooks/yq.py,sha256=Qh1ZTp8OVKvQ6sFzmKUMe3kbkYT5v7D4qEq6VsKtB2k,3503
|
8
9
|
airflow/providers/yandex/links/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
9
|
-
airflow/providers/yandex/links/yq.py,sha256=
|
10
|
+
airflow/providers/yandex/links/yq.py,sha256=I-Tp0EUb5-DhMmiQJcHSPiOK__7MkIYFIAfLxDlS4p0,1553
|
10
11
|
airflow/providers/yandex/operators/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
11
|
-
airflow/providers/yandex/operators/dataproc.py,sha256=
|
12
|
-
airflow/providers/yandex/operators/yq.py,sha256=
|
12
|
+
airflow/providers/yandex/operators/dataproc.py,sha256=wVNc7vHApsHhDAU_YZ_CEVMZTljk7X4PqIDVPBIPOQA,25697
|
13
|
+
airflow/providers/yandex/operators/yq.py,sha256=csvfEv1yXmc_bBIgMjs4Nh2yngk0tiQRM1GpgeJM5og,3287
|
13
14
|
airflow/providers/yandex/secrets/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
14
15
|
airflow/providers/yandex/secrets/lockbox.py,sha256=gUYWJE2qEvAZRz35qv0iKYK33BGnWesahZFuQgK5_kM,12168
|
15
16
|
airflow/providers/yandex/utils/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
@@ -17,7 +18,7 @@ airflow/providers/yandex/utils/credentials.py,sha256=l-8lIkQaIXTsNP_hMfP_tVADM54
|
|
17
18
|
airflow/providers/yandex/utils/defaults.py,sha256=CXt75MhGJe8echoDpl1vR4VG5bEvYDDjIHmFqckDh2w,950
|
18
19
|
airflow/providers/yandex/utils/fields.py,sha256=1D8SDWH8h0djj5Hnk50w6BpPeNJyP-689Qfjpkr-yCg,1728
|
19
20
|
airflow/providers/yandex/utils/user_agent.py,sha256=AC-WEzhjxkgUYOy4LdX2-nnUZdMhKRRUCJ2_TjfNm6k,1839
|
20
|
-
apache_airflow_providers_yandex-4.1.
|
21
|
-
apache_airflow_providers_yandex-4.1.
|
22
|
-
apache_airflow_providers_yandex-4.1.
|
23
|
-
apache_airflow_providers_yandex-4.1.
|
21
|
+
apache_airflow_providers_yandex-4.1.1rc1.dist-info/entry_points.txt,sha256=ApXKRkvdgU2QNSQovjewC0b-LptwfBGBnJB3LTgBNx8,102
|
22
|
+
apache_airflow_providers_yandex-4.1.1rc1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
23
|
+
apache_airflow_providers_yandex-4.1.1rc1.dist-info/METADATA,sha256=yBvtAO_FUNRAQibstvFccIl-8LLO1bhD86m9JLk37V8,5157
|
24
|
+
apache_airflow_providers_yandex-4.1.1rc1.dist-info/RECORD,,
|
File without changes
|