potiuk commented on code in PR #35302: URL: https://github.com/apache/airflow/pull/35302#discussion_r1378100220
########## 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( Review Comment: yes -- 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