uranusjr commented on a change in pull request #20305:
URL: https://github.com/apache/airflow/pull/20305#discussion_r769247700
##########
File path: airflow/providers/amazon/aws/hooks/athena.py
##########
@@ -25,7 +26,17 @@
from airflow.providers.amazon.aws.hooks.base_aws import AwsBaseHook
-class AWSAthenaHook(AwsBaseHook):
+class AWSAthenaHook:
+ """Deprecated Hook"""
+
+ warnings.warn(
+ "This hook is deprecated. Please use
`airflow.providers.amazon.aws.hooks.athena.AthenaHook`.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
Review comment:
This would make this warning unconditionally appear (even if this class
is never actually used), and existing code to all break. You should
1. Make `AWSAthenaHook` subclass `AthenaHook` (instead of the other way
around)
2. Move the deprecation warning to `__init__`.
--
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]