ephraimbuddy commented on code in PR #35983:
URL: https://github.com/apache/airflow/pull/35983#discussion_r1412063903


##########
airflow/providers/weaviate/hooks/weaviate.py:
##########
@@ -94,18 +93,14 @@ def get_conn(self) -> WeaviateClient:
             url=url, auth_client_secret=auth_client_secret, 
additional_headers=additional_headers
         )
 
+    @cached_property
     def get_client(self) -> WeaviateClient:
-        # Keeping this for backwards compatibility
-        warnings.warn(
-            "The `get_client` method has been renamed to `get_conn`",
-            AirflowProviderDeprecationWarning,
-            stacklevel=2,
-        )
+        """Returns a Weaviate client."""
         return self.get_conn()

Review Comment:
   I don't think having the cache on `get_conn` is a good one but I agree to 
keep the deprecation. It would be better to have another method like 
`_weaviate_client` or `conn` like @Lee-W suggested. It means more options for 
users and doing `hook.get_conn` would be just a statement that IDEs may not 
fancy.



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