Skip to content

Commit 2265066

Browse files
tomcsojnjhamon
andauthored
use getenv instead of accessing environ obj (#147)
I had problems importing the package after manipulating the environ object, so the "default" keyword argument was not available anymore. In this case getenv will still work. The module using getenv in all other occurences, so it also good to keep it consistent. Co-authored-by: Jennifer Hamon <jhamon@pinecone.io>
1 parent c5a4f0b commit 2265066

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pinecone/core/utils/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
MAX_MSG_SIZE = 128 * 1024 * 1024
1414

15-
MAX_ID_LENGTH = int(os.environ.get("PINECONE_MAX_ID_LENGTH", default="64"))
15+
MAX_ID_LENGTH = int(os.getenv("PINECONE_MAX_ID_LENGTH", default="64"))
1616

1717
REQUEST_ID: str = "request_id"
1818
CLIENT_VERSION_HEADER = 'X-Pinecone-Client-Version'

0 commit comments

Comments
 (0)