diff --git a/airflow/kubernetes/pod.py b/airflow/kubernetes/pod.py index 733f18477779e..a5b6cde0e335b 100644 --- a/airflow/kubernetes/pod.py +++ b/airflow/kubernetes/pod.py @@ -17,17 +17,18 @@ # under the License. """ This module is deprecated. -Please use :mod:`kubernetes.client.models for V1ResourceRequirements and Port. +Please use :mod:`kubernetes.client.models` for `V1ResourceRequirements` and `Port`. """ # flake8: noqa import warnings with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) from airflow.providers.cncf.kubernetes.backcompat.pod import Port, Resources # noqa: autoflake warnings.warn( - "This module is deprecated. Please use `kubernetes.client.models for V1ResourceRequirements and Port.", + "This module is deprecated. Please use `kubernetes.client.models` for `V1ResourceRequirements` and `Port`.", DeprecationWarning, stacklevel=2, ) diff --git a/airflow/kubernetes/pod_runtime_info_env.py b/airflow/kubernetes/pod_runtime_info_env.py index 5dbbd4249d211..a51f3b96fc39a 100644 --- a/airflow/kubernetes/pod_runtime_info_env.py +++ b/airflow/kubernetes/pod_runtime_info_env.py @@ -19,6 +19,7 @@ import warnings with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) from airflow.providers.cncf.kubernetes.backcompat.pod_runtime_info_env import PodRuntimeInfoEnv # noqa warnings.warn( diff --git a/airflow/kubernetes/volume.py b/airflow/kubernetes/volume.py index 90bd4c23bbd25..81b4fda3a15da 100644 --- a/airflow/kubernetes/volume.py +++ b/airflow/kubernetes/volume.py @@ -19,6 +19,7 @@ import warnings with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) from airflow.providers.cncf.kubernetes.backcompat.volume import Volume # noqa: autoflake warnings.warn( diff --git a/airflow/kubernetes/volume_mount.py b/airflow/kubernetes/volume_mount.py index aff5f30d5840e..f558425881752 100644 --- a/airflow/kubernetes/volume_mount.py +++ b/airflow/kubernetes/volume_mount.py @@ -19,6 +19,7 @@ import warnings with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) from airflow.providers.cncf.kubernetes.backcompat.volume_mount import VolumeMount # noqa: autoflake warnings.warn(