amoghrajesh commented on code in PR #55712:
URL: https://github.com/apache/airflow/pull/55712#discussion_r2351592977


##########
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. "
+            "Use SecretsMasker.enable_log_masking(), disable_log_masking(), or 
is_log_masking_enabled() instead.",
+            DeprecationWarning,
+            stacklevel=2,
+        )
+        return

Review Comment:
   Was heading in this direction: 
   ```
   Python 3.10.18 (main, Sep  8 2025, 22:04:00) [GCC 12.2.0] on linux
   Type "help", "copyright", "credits" or "license" for more information.
   >>> import airflow.settings
   >>> airflow.settings.MASK_SECRETS_IN_LOGS
   <stdin>:1 DeprecationWarning: 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.
   False
   ```
   
   I'm not sure if thats the best way ahead :/



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to