File tree Expand file tree Collapse file tree 2 files changed +1
-40
lines changed
airflow-core/src/airflow/utils Expand file tree Collapse file tree 2 files changed +1
-40
lines changed Original file line number Diff line number Diff line change 2020
2121from airflow .utils .deprecation_tools import add_deprecated_classes
2222
23-
24- def _deprecate_this_module (message : str , ** shims : tuple [str , str ]):
25- import warnings
26-
27- from airflow .exceptions import RemovedInAirflow4Warning
28-
29- warnings .warn (message , RemovedInAirflow4Warning , stacklevel = 3 )
30-
31- def __getattr__ (name : str ):
32- try :
33- impa , attr = shims [name ]
34- except KeyError :
35- raise AttributeError (f"module { __name__ !r} has no attribute { name !r} " ) from None
36- return getattr (__import__ (impa ), attr )
37-
38- return __getattr__
39-
40-
4123__deprecated_classes = {
4224 "setup_teardown" : {
4325 "BaseSetupTeardownContext" : "airflow.sdk.definitions._internal.setup_teardown.BaseSetupTeardownContext" ,
@@ -47,4 +29,5 @@ def __getattr__(name: str):
4729 "XCOM_RETURN_KEY" : "airflow.models.xcom.XCOM_RETURN_KEY" ,
4830 },
4931}
32+
5033add_deprecated_classes (__deprecated_classes , __name__ )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments