This is an automated email from the ASF dual-hosted git repository.
potiuk 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 a0baa684ab Remove deprecated get_connections() function in BaseHook
(#41733)
a0baa684ab is described below
commit a0baa684ab037b7e19ca75006cf4387527351b4e
Author: Jens Scheffler <[email protected]>
AuthorDate: Tue Aug 27 16:32:37 2024 +0200
Remove deprecated get_connections() function in BaseHook (#41733)
* Remove deprecated get_connections() function in BaseHook
* Adding newsfragment after PR open
---
airflow/hooks/base.py | 18 ------------------
newsfragments/41733.significant.rst | 1 +
2 files changed, 1 insertion(+), 18 deletions(-)
diff --git a/airflow/hooks/base.py b/airflow/hooks/base.py
index d2a47e321c..e82c838c8c 100644
--- a/airflow/hooks/base.py
+++ b/airflow/hooks/base.py
@@ -20,10 +20,8 @@
from __future__ import annotations
import logging
-import warnings
from typing import TYPE_CHECKING, Any
-from airflow.exceptions import RemovedInAirflow3Warning
from airflow.typing_compat import Protocol
from airflow.utils.log.logging_mixin import LoggingMixin
@@ -54,22 +52,6 @@ class BaseHook(LoggingMixin):
self._log_config_logger_name = "airflow.task.hooks"
self._logger_name = logger_name
- @classmethod
- def get_connections(cls, conn_id: str) -> list[Connection]:
- """
- Get all connections as an iterable, given the connection id.
-
- :param conn_id: connection id
- :return: array of connections
- """
- warnings.warn(
- "`BaseHook.get_connections` method will be deprecated in the
future."
- "Please use `BaseHook.get_connection` instead.",
- RemovedInAirflow3Warning,
- stacklevel=2,
- )
- return [cls.get_connection(conn_id)]
-
@classmethod
def get_connection(cls, conn_id: str) -> Connection:
"""
diff --git a/newsfragments/41733.significant.rst
b/newsfragments/41733.significant.rst
new file mode 100644
index 0000000000..b838586e47
--- /dev/null
+++ b/newsfragments/41733.significant.rst
@@ -0,0 +1 @@
+Removed deprecated function ``get_connections()`` function in
``airflow.hooks.base.BaseHook``.