amoghrajesh commented on code in PR #56921:
URL: https://github.com/apache/airflow/pull/56921#discussion_r2454115680
##########
airflow-core/docs/release-process.rst:
##########
@@ -74,12 +74,12 @@ Deprecation policy
From time-to-time existing features will be deprecated, or modules will be
renamed.
-When this happens, the existing code will continue to work but will issue a
DeprecationWarning (or a subclass) when the code is executed.
+When this happens, the existing code will continue to work but will issue a
DeprecatedImportWarning (or a subclass) when the code is executed.
This code will continue to work for the rest of the current major version --
if it works on 2.0.0, it will work for every 2.Y.Z release.
So, for example, if we decided to start the deprecation of a function in
Airflow 2.2.4:
-* Airflow 2.2 will contain a backwards-compatible replica of the function
which will raise a DeprecationWarning
+* Airflow 2.2 will contain a backwards-compatible replica of the function
which will raise a DeprecatedImportWarning
Review Comment:
This could be confusing to some, can we update versions as:
2.2.4/3.1.1
and 2.2/3.1?
##########
airflow-core/src/airflow/exceptions.py:
##########
@@ -472,14 +474,14 @@ class PodReconciliationError(AirflowException): # type:
ignore[no-redef]
"""Raised when an error is encountered while trying to merge pod
configs."""
-class RemovedInAirflow4Warning(DeprecationWarning):
+class RemovedInAirflow4Warning(DeprecatedImportWarning):
"""Issued for usage of deprecated features that will be removed in
Airflow4."""
deprecated_since: str | None = None
"Indicates the airflow version that started raising this deprecation
warning"
-class AirflowProviderDeprecationWarning(DeprecationWarning):
+class AirflowProviderDeprecationWarning(DeprecatedImportWarning):
Review Comment:
Same here.
##########
airflow-core/src/airflow/configuration.py:
##########
@@ -59,7 +60,7 @@
# show Airflow's deprecation warnings
if not sys.warnoptions:
- warnings.filterwarnings(action="default", category=DeprecationWarning,
module="airflow")
+ warnings.filterwarnings(action="default",
category=DeprecatedImportWarning, module="airflow")
Review Comment:
I dont think this has to change.
##########
airflow-core/src/airflow/exceptions.py:
##########
@@ -472,14 +474,14 @@ class PodReconciliationError(AirflowException): # type:
ignore[no-redef]
"""Raised when an error is encountered while trying to merge pod
configs."""
-class RemovedInAirflow4Warning(DeprecationWarning):
+class RemovedInAirflow4Warning(DeprecatedImportWarning):
Review Comment:
This is wrong too, do not change existing exceptions
--
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]