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 8e8c080050 Provide the logger_name param to base hook in order to
override the logger name (#36674)
8e8c080050 is described below
commit 8e8c080050c374b47fd0e6ffb8cb0a27adbca055
Author: Hussein Awala <[email protected]>
AuthorDate: Tue Jan 9 03:38:59 2024 +0100
Provide the logger_name param to base hook in order to override the logger
name (#36674)
---
airflow/hooks/filesystem.py | 4 ++--
airflow/hooks/package_index.py | 4 ++--
airflow/hooks/subprocess.py | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/airflow/hooks/filesystem.py b/airflow/hooks/filesystem.py
index 557236d52c..0877b05ecc 100644
--- a/airflow/hooks/filesystem.py
+++ b/airflow/hooks/filesystem.py
@@ -59,8 +59,8 @@ class FSHook(BaseHook):
"placeholders": {},
}
- def __init__(self, fs_conn_id: str = default_conn_name):
- super().__init__()
+ def __init__(self, fs_conn_id: str = default_conn_name, **kwargs):
+ super().__init__(**kwargs)
conn = self.get_connection(fs_conn_id)
self.basepath = conn.extra_dejson.get("path", "")
self.conn = conn
diff --git a/airflow/hooks/package_index.py b/airflow/hooks/package_index.py
index 87e830f68a..b1b86f77e3 100644
--- a/airflow/hooks/package_index.py
+++ b/airflow/hooks/package_index.py
@@ -33,8 +33,8 @@ class PackageIndexHook(BaseHook):
conn_type = "package_index"
hook_name = "Package Index (Python)"
- def __init__(self, pi_conn_id: str = default_conn_name) -> None:
- super().__init__()
+ def __init__(self, pi_conn_id: str = default_conn_name, **kwargs) -> None:
+ super().__init__(**kwargs)
self.pi_conn_id = pi_conn_id
self.conn = None
diff --git a/airflow/hooks/subprocess.py b/airflow/hooks/subprocess.py
index 051b4cf662..bc20b5c20b 100644
--- a/airflow/hooks/subprocess.py
+++ b/airflow/hooks/subprocess.py
@@ -31,9 +31,9 @@ SubprocessResult = namedtuple("SubprocessResult",
["exit_code", "output"])
class SubprocessHook(BaseHook):
"""Hook for running processes with the ``subprocess`` module."""
- def __init__(self) -> None:
+ def __init__(self, **kwargs) -> None:
self.sub_process: Popen[bytes] | None = None
- super().__init__()
+ super().__init__(**kwargs)
def run_command(
self,