blag commented on code in PR #25799:
URL: https://github.com/apache/airflow/pull/25799#discussion_r952032327
##########
airflow/exceptions.py:
##########
@@ -338,3 +338,17 @@ class TaskDeferralError(AirflowException):
class PodReconciliationError(AirflowException):
"""Raised when an error is encountered while trying to merge pod
configs."""
+
+
+class RemoveInAirflow3DeprecationWarning(DeprecationWarning):
Review Comment:
However, we may not want this to be immediately visible to DAG authors,
because at this point we [should still assume that we will only have 2.x
releases](https://apache-airflow.slack.com/archives/CCPRP7943/p1661211652517059).
Subclassing from DeprecationWarning (or PendingDeprecationWarning) might
actually be the right call here until we have concrete plans for Airflow 3.0.
[PEP-0387](https://peps.python.org/pep-0387/#making-incompatible-changes):
> If an API is being removed, simply warn whenever it is entered.
DeprecationWarning is the usual warning category to use, but
**PendingDeprecationWarning may be used in special cases where the old and new
versions of the API will coexist for many releases
[[2]](https://peps.python.org/pep-0387/#warnings)**.
(emphasis mine)
--
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]