Skip to content

Conversation

@tomcsojn
Copy link
Contributor

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.

Copy link
Collaborator

@jhamon jhamon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the official Python docs for os.getenv, it says:

Note that since getenv() uses os.environ, the mapping of getenv() is similarly also captured on import, and the function may not reflect future environment changes.

So I'm not confident this change will resolve the problem you experienced. But I also think it's fine to make this change, to improve consistency of the code overall.

@jhamon jhamon merged commit 2265066 into pinecone-io:main May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants