amoghrajesh commented on code in PR #63711:
URL: https://github.com/apache/airflow/pull/63711#discussion_r2945594976


##########
airflow-core/src/airflow/providers_manager.py:
##########
@@ -1061,6 +1061,14 @@ def _import_hook(
                 # inherited from parent hook. This way we add form fields only 
once for the whole
                 # hierarchy and we add it only from the parent hook that 
provides those!
                 if "get_connection_form_widgets" in hook_class.__dict__:
+                    warnings.warn(
+                        f"Hook '{hook_class_name}' defines 
get_connection_form_widgets(). "
+                        "This method is deprecated. Define connection fields 
declaratively in "
+                        "provider.yaml under 'conn-fields' instead. See "
+                        
"https://airflow.apache.org/docs/apache-airflow/stable/howto/connection.html";,
+                        DeprecationWarning,
+                        stacklevel=2,
+                    )

Review Comment:
   Kept it with stacklevel for now.



-- 
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]

Reply via email to