You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adjust config kwargs to Pinecone and PineconeAsyncio (#447)
## Problem
We want to deprecate a few kwargs and give more helpful error messages.
## Solution
- Deprecate `config` and `openapi_config` kwargs; as far as I know these
were only used for tests. They have not appeared in documentation. It
adds quite a bit of complexity trying to merge configuration from all
these sources so going forward we would prefer to just expect
configuration from a single source, which are named kwargs.
- Add `NotImplementedError` messages that clearly explain some features
that are not implemented yet for PineconeAsyncio. This is preferrable to
allowing users to pass kwargs that have no effect, then getting
frustrated when they seem not to work.
- Give more informative error when it looks like the user has passed an
invalid value as the host
## Type of Change
- [x] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [x] This change requires a documentation update
raiseTypeError("config must be of type pinecone.config.Config")
70
-
else:
71
-
self.config=config
72
-
else:
73
-
self.config=PineconeConfig.build(
74
-
api_key=api_key,
75
-
host=host,
76
-
additional_headers=additional_headers,
77
-
proxy_url=proxy_url,
78
-
proxy_headers=proxy_headers,
79
-
ssl_ca_certs=ssl_ca_certs,
80
-
ssl_verify=ssl_verify,
81
-
**kwargs,
66
+
ifkwargs.get("config", None):
67
+
raiseException(
68
+
"Passing config is no longer supported. Please pass individual 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 https://github.com/pinecone-io/pinecone-python-client for examples."
82
69
)
83
-
84
70
ifkwargs.get("openapi_config", None):
85
71
raiseException(
86
-
"Passing openapi_config is no longer supported. 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 https://github.com/pinecone-io/pinecone-python-client for examples."
72
+
"Passing openapi_config is no longer supported. Please pass individual 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 https://github.com/pinecone-io/pinecone-python-client for examples."
0 commit comments