weaviate / weaviate-python-client

A python native client for easy interaction with a Weaviate instance.
https://weaviate.io/developers/weaviate/current/client-libraries/python.html
BSD 3-Clause "New" or "Revised" License
162 stars 74 forks source link

Deprecation Warning Incorrectly Triggered for Weaviate Client v4.5.7 #1053

Closed AutoJenny closed 6 months ago

AutoJenny commented 6 months ago

Environment:

Weaviate Python Client Version: 4.5.7 Python Version: 3.10 Operating System: MacOS (latest) Issue Description: Despite using the latest version (v4.5.7) of the Weaviate Python client, I am consistently receiving a deprecation warning stating that I am using the Weaviate v3 client, which is deprecated. This warning seems to be incorrectly triggered.

Steps to Reproduce:

Install Weaviate Python client v4.5.7. Run any script that initializes the Weaviate client. Observe the deprecation warning in the console. Expected Behavior: No deprecation warning should be shown when using the latest version of the Weaviate Python client.

Actual Behavior: The following deprecation warning is displayed:

vbnet Copy code DeprecationWarning: Dep016: You are using the Weaviate v3 client, which is deprecated. Consider upgrading to the new and improved v4 client instead! See here for usage: https://weaviate.io/developers/weaviate/client-libraries/python Additional Information:

The warning is triggered from warnings.py in the Weaviate client package. I have confirmed that my environment is using the correct version (4.5.7) of the client, as shown by pip show weaviate-client. Potential Impact: This may confuse users about the version of the client they are using and whether they need to update their client library.

I would appreciate any guidance on this issue or a fix in an upcoming release if this is confirmed as a bug.

dirkkul commented 6 months ago

Hi,

this is expected behaviour.

The v4 client contains a copy of the v3 client to make the transition easier. If you initialise your client with:

See here for a migration guide: https://weaviate.io/developers/weaviate/client-libraries/python/v3_v4_migration

I improved the deprecation warning, to make it clearer: https://github.com/weaviate/weaviate-python-client/pull/1054