This is an automated email from the ASF dual-hosted git repository.
taragolis 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 d75e5ef00a Deprecate get_hook method in DockerOperator (#34432)
d75e5ef00a is described below
commit d75e5ef00aefece4197e0fe86cc8822cdb06dcac
Author: Hussein Awala <[email protected]>
AuthorDate: Mon Sep 18 21:08:24 2023 +0200
Deprecate get_hook method in DockerOperator (#34432)
* Deprecate get_hook method in DockerOperator
* use AirflowProviderDeprecationWarning
---
airflow/providers/docker/operators/docker.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/airflow/providers/docker/operators/docker.py
b/airflow/providers/docker/operators/docker.py
index aa7704298c..acb8ccb957 100644
--- a/airflow/providers/docker/operators/docker.py
+++ b/airflow/providers/docker/operators/docker.py
@@ -28,6 +28,7 @@ from io import BytesIO, StringIO
from tempfile import TemporaryDirectory
from typing import TYPE_CHECKING, Iterable, Sequence
+from deprecated.classic import deprecated
from docker.constants import DEFAULT_TIMEOUT_SECONDS
from docker.errors import APIError
from docker.types import LogConfig, Mount, Ulimit
@@ -328,6 +329,7 @@ class DockerOperator(BaseOperator):
timeout=self.timeout,
)
+ @deprecated(reason="use `hook` property instead.",
category=AirflowProviderDeprecationWarning)
def get_hook(self) -> DockerHook:
"""Create and return an DockerHook (cached)."""
return self.hook