This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 1fb521e213a4e280bf9bb083ac5cffd3c416f9a9
Author: Amogh Desai <[email protected]>
AuthorDate: Wed Sep 17 17:05:52 2025 +0530

    Adding a backcompat warning layer for airflow.settings.MASK_SECRETS_IN_LOGS 
(#55712)
    
    (cherry picked from commit 0bd1c828d115afa5621abb4de38398655f6bb446)
---
 airflow-core/src/airflow/settings.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/airflow-core/src/airflow/settings.py 
b/airflow-core/src/airflow/settings.py
index 733a539b344..5a873844876 100644
--- a/airflow-core/src/airflow/settings.py
+++ b/airflow-core/src/airflow/settings.py
@@ -633,6 +633,21 @@ def prepare_syspath_for_config_and_plugins():
         sys.path.append(PLUGINS_FOLDER)
 
 
+def __getattr__(name: str):
+    """Handle deprecated module attributes."""
+    if name == "MASK_SECRETS_IN_LOGS":
+        import warnings
+
+        warnings.warn(
+            "settings.MASK_SECRETS_IN_LOGS has been removed. This shim returns 
default value of False. "
+            "Use SecretsMasker.enable_log_masking(), disable_log_masking(), or 
is_log_masking_enabled() instead.",
+            DeprecationWarning,
+            stacklevel=2,
+        )
+        return False
+    raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
+
+
 def import_local_settings():
     """Import airflow_local_settings.py files to allow overriding any configs 
in settings.py file."""
     try:

Reply via email to