Python client warning: Passing openapi_config is deprecated and will be removed in a future release

pinecone-client version: 3.2.1
Index type: Serverless

We just started a PoC to see if Pinecone Serverless will meet our needs for our semantic search needs and are going through the quickstart.

Upon creating a new index, the python client shows the following warning:

warnings.warn(“Passing openapi_config is deprecated and will be removed in a future release. Please pass settings such as proxy_url, proxy_headers, ssl_ca_certs, and ssl_verify directly to the Pinecone constructor as keyword arguments. See the README at GitHub - pinecone-io/pinecone-python-client: The Pinecone Python client for examples.”, DeprecationWarning)

The initialization code is mostly straight out from the quickstart.
Code snippet:

pinecone = Pinecone(api_key=os.getenv('PINECONE_API_KEY'))

index = pinecone.Index(name=index_name)

It is very odd, as

  • We are not passing openapi_config arg
  • Looks like the client is automatically setting openapi_config. For example, if I try to pass index = pinecone.Index(name=index_name, openapi_config=None), it complains that there are duplicate values for openapi_config.

Does anyone have the same issue?
How could I suppress the client auto-setting openapi_config?

Hi, I work on the python sdk. :wave:

This definitely seems like a bug, so you have my apologies. This warning was introduced late last week in this release alongside new properties for custom proxy configuration. But you’re right that it’s not appropriate in this instance.

Until I ship a fix, you can safely ignore the warning. Or if you don’t want to see it at all, I think it can be suppressed by putting something like this into the startup for your application or script:

import warnings

warnings.filterwarnings("ignore", category=DeprecationWarning, module="pinecone")

I’ll try to get a fix out soon clearing up this issue.

Awesome, thanks for your quick reply!
Looking forward to the fix:)

I just shipped a v3.2.2 release which I believe should take care of this issue. Thanks for reporting!