jedcunningham commented on code in PR #35302:
URL: https://github.com/apache/airflow/pull/35302#discussion_r1378161817


##########
airflow/www/fab_security/manager.py:
##########
@@ -63,6 +63,35 @@
 # Copyright 2013, Daniel Vaz Gaspar
 log = logging.getLogger(__name__)
 
+__lazy_imports = {
+    "AUTH_DB": "flask_appbuilder.const",
+    "AUTH_LDAP": "flask_appbuilder.const",
+    "LOGMSG_WAR_SEC_LOGIN_FAILED": "flask_appbuilder.const",
+}
+
+
+def __getattr__(name: str):
+    # PEP-562: Lazy loaded attributes on python modules
+    path = __lazy_imports.get(name)
+    if not path:
+        raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
+
+    import warnings
+
+    warnings.warn(
+        f"Importing {name!r} directly from {__name__!r} is deprecated and "
+        f"will be removed in the future. Please import it from 
'{path}.{name}'.",
+        DeprecationWarning,
+        stacklevel=2,
+    )
+

Review Comment:
   ```suggestion
   ```



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to