hussein-awala commented on code in PR #35983:
URL: https://github.com/apache/airflow/pull/35983#discussion_r1412024381


##########
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:
   Instead of removing the deprecation warning from this method, you can make 
`get_conn` a cached property and change this method to:
   ```suggestion
           return self.get_conn
   ```
   In that way, you will achieve what you want to do without replacing 
`self.get_client()` with `self.get_client`, and this method will stay 
deprecated.



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