Skip to content

Commit 35bc7be

Browse files
authored
Support Python 3.13 in Yandex provider (#61380)
* Support Python 3.13 in Yandex provider
1 parent cec8ba6 commit 35bc7be

File tree

7 files changed

+22
-15
lines changed

7 files changed

+22
-15
lines changed

dev/breeze/tests/test_selective_checks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ def test_excluded_providers():
13211321
{
13221322
"excluded-providers-as-string": json.dumps(
13231323
{
1324-
"3.13": ["apache.beam", "apache.kafka", "fab", "yandex", "ydb"],
1324+
"3.13": ["apache.beam", "apache.kafka", "fab", "ydb"],
13251325
}
13261326
),
13271327
},

providers/yandex/docs/index.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,16 @@ Requirements
101101

102102
The minimum Apache Airflow version supported by this provider distribution is ``2.11.0``.
103103

104-
========================================== ======================================
104+
========================================== =======================================
105105
PIP package Version required
106-
========================================== ======================================
106+
========================================== =======================================
107107
``apache-airflow`` ``>=2.11.0``
108-
``yandexcloud`` ``>=0.308.0; python_version < "3.13"``
109-
``yandex-query-client`` ``>=0.1.4; python_version < "3.13"``
108+
``yandexcloud`` ``>=0.376.0; python_version >= "3.13"``
109+
``yandexcloud`` ``>=0.328.0; python_version < "3.13"``
110+
``yandex-query-client`` ``>=0.1.4``
110111
``apache-airflow-providers-common-compat`` ``>=1.13.0``
111-
========================================== ======================================
112+
``grpcio`` ``>=1.70.0; python_version >= "3.13"``
113+
========================================== =======================================
112114

113115
Cross provider package dependencies
114116
-----------------------------------

providers/yandex/provider.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ versions:
6666
- 1.0.1
6767
- 1.0.0
6868

69-
excluded-python-versions:
70-
- "3.13"
7169

7270
integrations:
7371
- integration-name: Yandex.Cloud

providers/yandex/pyproject.toml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,26 @@ classifiers = [
4848
"Programming Language :: Python :: 3.10",
4949
"Programming Language :: Python :: 3.11",
5050
"Programming Language :: Python :: 3.12",
51+
"Programming Language :: Python :: 3.13",
5152
"Topic :: System :: Monitoring",
5253
]
53-
requires-python = ">=3.10,!=3.13"
54+
requires-python = ">=3.10"
5455

5556
# The dependencies should be modified in place in the generated file.
5657
# Any change in the dependencies is preserved when the file is regenerated
5758
# Make sure to run ``prek update-providers-dependencies --all-files``
5859
# After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
5960
dependencies = [
6061
"apache-airflow>=2.11.0",
61-
"yandexcloud>=0.308.0; python_version < '3.13'",
62-
"yandex-query-client>=0.1.4; python_version < '3.13'",
62+
'yandexcloud>=0.376.0; python_version >= "3.13"',
63+
'yandexcloud>=0.328.0; python_version < "3.13"',
64+
"yandex-query-client>=0.1.4",
6365
"apache-airflow-providers-common-compat>=1.13.0",
66+
# Adding temp min version for grpcio to address
67+
# ERROR providers/yandex/tests/unit/yandex/operators/test_dataproc.py - RuntimeError: The grpc package installed is at version 1.68.1, but the generated code in yandex/cloud/endpoint/api_endpoint_service_pb2_grpc.py depends on grpcio>=1.70.0. Please upgrade your grpc module to grpcio>=1.70.0 or downgrade your generated code using grpcio-tools<=1.68.1.
68+
# this dependency can be removed when yandexcloud bump min version of grpcio to 1.70
69+
# https://github.com/yandex-cloud/python-sdk/blob/82493e32bbf1d678afbb8376632b3f5b5923fd10/pyproject.toml#L23
70+
'grpcio>=1.70.0; python_version >= "3.13"',
6471
]
6572

6673
[dependency-groups]

providers/yandex/src/airflow/providers/yandex/operators/dataproc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def execute(self, context: Context) -> dict:
240240
initialization_actions=[
241241
self.hook.sdk.wrappers.InitializationAction(
242242
uri=init_action.uri,
243-
args=init_action.args,
243+
args=list(init_action.args),
244244
timeout=init_action.timeout,
245245
)
246246
for init_action in self.initialization_actions

providers/yandex/tests/system/yandex/example_yandexcloud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def create_cluster(
139139
if operation_result.response is None:
140140
return None
141141

142-
return operation_result.response.id
142+
return operation_result.response.id # type: ignore[attr-defined]
143143

144144

145145
@task

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ packages = []
376376
"apache-airflow-providers-weaviate>=3.0.0"
377377
]
378378
"yandex" = [
379-
"apache-airflow-providers-yandex>=4.0.0; python_version !=\"3.13\""
379+
"apache-airflow-providers-yandex>=4.0.0"
380380
]
381381
"ydb" = [
382382
"apache-airflow-providers-ydb>=1.4.0; python_version !=\"3.13\""
@@ -481,7 +481,7 @@ packages = []
481481
"apache-airflow-providers-trino>=5.8.1",
482482
"apache-airflow-providers-vertica>=3.9.1",
483483
"apache-airflow-providers-weaviate>=3.0.0",
484-
"apache-airflow-providers-yandex>=4.0.0; python_version !=\"3.13\"",
484+
"apache-airflow-providers-yandex>=4.0.0",
485485
"apache-airflow-providers-ydb>=1.4.0; python_version !=\"3.13\"",
486486
"apache-airflow-providers-zendesk>=4.9.0",
487487
]

0 commit comments

Comments
 (0)