kaxil commented on code in PR #53339:
URL: https://github.com/apache/airflow/pull/53339#discussion_r2213207685
##########
airflow-core/src/airflow/utils/__init__.py:
##########
@@ -20,31 +20,17 @@
from airflow.utils.deprecation_tools import add_deprecated_classes
-
-def _deprecate_this_module(message: str, **shims: tuple[str, str]):
- import warnings
-
- from airflow.exceptions import RemovedInAirflow4Warning
-
- warnings.warn(message, RemovedInAirflow4Warning, stacklevel=3)
-
- def __getattr__(name: str):
- try:
- impa, attr = shims[name]
- except KeyError:
- raise AttributeError(f"module {__name__!r} has no attribute
{name!r}") from None
- return getattr(__import__(impa), attr)
-
- return __getattr__
-
-
__deprecated_classes = {
"setup_teardown": {
"BaseSetupTeardownContext":
"airflow.sdk.definitions._internal.setup_teardown.BaseSetupTeardownContext",
"SetupTeardownContext":
"airflow.sdk.definitions._internal.setup_teardown.SetupTeardownContext",
},
+ "warnings": {
+ "capture_with_reraise": "airflow.models.dagbag._capture_with_reraise",
+ },
Review Comment:
Isn't this an internal module already, do we need back-compat?
--
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]