Taragolis commented on code in PR #36831:
URL: https://github.com/apache/airflow/pull/36831#discussion_r1454656928
##########
airflow/providers/celery/executors/celery_executor_utils.py:
##########
@@ -88,7 +88,8 @@ def _get_celery_app() -> Celery:
"Change it to
`airflow.providers.celery.executors.celery_executor`, and "
"update the `-app` flag in your Celery Health Checks "
"to use `airflow.providers.celery.executors.celery_executor.app`.",
- RemovedInAirflow3Warning,
+ AirflowProviderDeprecationWarning,
Review Comment:
This part migrated from the core into the providers, I'm not 100% sure that
this change is correct.
I just feeling that is better to use `AirflowProviderDeprecationWarning`
instead of `RemovedInAirflow3Warning`
##########
airflow/providers/google/cloud/links/dataproc.py:
##########
@@ -76,10 +80,6 @@ class DataprocLink(BaseOperatorLink):
This link is deprecated.
"""
- warnings.warn(
- "This DataprocLink is deprecated.",
- AirflowProviderDeprecationWarning,
- )
Review Comment:
This one will raise a warning every time when module
`airflow.providers.google.cloud.links.dataproc` imported, so I move it into the
`__attrs_post_init__`
##########
airflow/providers/microsoft/azure/hooks/adx.py:
##########
@@ -142,7 +142,9 @@ def warn_if_collison(key, backcompat_key):
warnings.warn(
f"Conflicting params `{key}` and `{backcompat_key}` found
in extras for conn "
f"{self.conn_id}. Using value for `{key}`. Please ensure
this is the correct value "
- f"and remove the backcompat key `{backcompat_key}`."
+ f"and remove the backcompat key `{backcompat_key}`.",
+ UserWarning,
+ stacklevel=2,
Review Comment:
Just a personal thought that `UserWarning` fit here (and in the same places)
better, but maybe I'm wrong
--
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]