You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by je...@apache.org on 2023/07/27 21:24:29 UTC
[airflow] branch main updated: Add missing deprecated imports after k8s move (#32891)
This is an automated email from the ASF dual-hosted git repository.
jedcunningham pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 46d7125214 Add missing deprecated imports after k8s move (#32891)
46d7125214 is described below
commit 46d712521482c79da374fa41f1f6041b7f8ece93
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Thu Jul 27 23:24:21 2023 +0200
Add missing deprecated imports after k8s move (#32891)
The #32767 missed imports of imports for a few kubernetes modules.
This PR adds the missing ones.
---
airflow/kubernetes/__init__.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/airflow/kubernetes/__init__.py b/airflow/kubernetes/__init__.py
index cf4e9a9591..4cea2a1877 100644
--- a/airflow/kubernetes/__init__.py
+++ b/airflow/kubernetes/__init__.py
@@ -42,6 +42,9 @@ __deprecated_classes: dict[str, dict[str, str]] = {
"pod_launcher_deprecated": {
"PodLauncher": "airflow.providers.cncf.kubernetes.pod_launcher_deprecated.PodLauncher",
"PodStatus": "airflow.providers.cncf.kubernetes.pod_launcher_deprecated.PodStatus",
+ # imports of imports from other kubernetes modules (in case they are imported from here)
+ "get_kube_client": "airflow.providers.cncf.kubernetes.kube_client.get_kube_client",
+ "PodDefaults": "airflow.providers.cncf.kubernetes.pod_generator_deprecated.PodDefaults",
},
"pod_runtime_info_env": {
"PodRuntimeInfoEnv": "airflow.providers.cncf.kubernetes.backcompat."
@@ -75,6 +78,14 @@ __deprecated_classes: dict[str, dict[str, str]] = {
"make_safe_label_value",
"merge_objects": "airflow.kubernetes.pre_7_4_0_compatibility.pod_generator.merge_objects",
"PodGenerator": "airflow.kubernetes.pre_7_4_0_compatibility.pod_generator.PodGenerator",
+ # imports of imports from other kubernetes modules (in case they are imported from here)
+ "PodGeneratorDeprecated": "airflow.kubernetes.pre_7_4_0_compatibility."
+ "pod_generator_deprecated.PodGenerator",
+ "PodDefaults": "airflow.kubernetes.pre_7_4_0_compatibility.pod_generator_deprecated.PodDefaults",
+ # those two are inlined in kubernetes.pre_7_4_0_compatibility.pod_generator even if
+ # originally they were imported in airflow.kubernetes.pod_generator
+ "add_pod_suffix": "airflow.kubernetes.pre_7_4_0_compatibility.pod_generator.add_pod_suffix",
+ "rand_str": "airflow.kubernetes.pre_7_4_0_compatibility.pod_generator.rand_str",
},
"pod_generator_deprecated": {
"make_safe_label_value": "airflow.kubernetes.pre_7_4_0_compatibility.pod_generator_deprecated."
@@ -84,6 +95,8 @@ __deprecated_classes: dict[str, dict[str, str]] = {
},
"secret": {
"Secret": "airflow.kubernetes.pre_7_4_0_compatibility.secret.Secret",
+ # imports of imports from other kubernetes modules (in case they are imported from here)
+ "K8SModel": "airflow.kubernetes.pre_7_4_0_compatibility.k8s_model.K8SModel",
},
}