Skip to content

Commit c58b20c

Browse files
authored
Merge pull request #4 from pinecone-io/ch9770
Use deep copy to create new object to avoid reusing config
2 parents 96804cf + 20ea9e9 commit c58b20c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
## [Unreleased]
44

55
### Changed
6+
- The python client `pinecone.config.OpenApiConfiguration` object now uses the certifi package's SSL CA bundle by default. This should fix HTTPS connection errors in certain environments depending on their default CA bundle, including some Google Colab notebooks.
7+
- A bug causing different index instances to share the same configuration object was fixed.
68
- Deprecated control via `pinecone.init()` of the pinecone logger's log level and removed the loguru dependency. To control log level now, use the standard library's logging module to manage the level of the "pinecone" logger or its children.
79

10+
811
## [2.0.1] - 2021-10-06
912
### Added
1013
- New `timeout` parameter to the `pinecone.create_index()` and the `pinecone.delete_index()` call.

pinecone/index.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
ScoredVector, SingleQueryResults, DescribeIndexStatsResponse, UpsertRequest, UpsertResponse, Vector
1212
from pinecone.core.client.api.vector_operations_api import VectorOperationsApi
1313
from pinecone.core.utils import fix_tuple_length, get_user_agent
14+
import copy
1415

1516
__all__ = [
1617
"Index", "FetchResponse", "ProtobufAny", "QueryRequest", "QueryResponse", "QueryVector", "RpcStatus",
@@ -28,7 +29,7 @@
2829
class Index(ApiClient):
2930

3031
def __init__(self, index_name: str, pool_threads=1):
31-
openapi_client_config = Config.OPENAPI_CONFIG
32+
openapi_client_config = copy.deepcopy(Config.OPENAPI_CONFIG)
3233
openapi_client_config.api_key = openapi_client_config.api_key or {}
3334
openapi_client_config.api_key['ApiKeyAuth'] = openapi_client_config.api_key.get('ApiKeyAuth', Config.API_KEY)
3435
openapi_client_config.server_variables = openapi_client_config.server_variables or {}

0 commit comments

Comments
 (0)