Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-39406: Implement os.putenv() with setenv() if available#18128

Merged
vstinner merged 2 commits into
python:masterpython/cpython:masterfrom
vstinner:setenv2Copy head branch name to clipboard
Jan 22, 2020
Merged

bpo-39406: Implement os.putenv() with setenv() if available#18128
vstinner merged 2 commits into
python:masterpython/cpython:masterfrom
vstinner:setenv2Copy head branch name to clipboard

Conversation

@vstinner

@vstinner vstinner commented Jan 22, 2020

Copy link
Copy Markdown
Member

If setenv() C function is available, os.putenv() is now implemented
with setenv() instead of putenv(), so Python doesn't have to handle
the environment variable memory.

https://bugs.python.org/issue39406

If setenv() C function is available, os.putenv() is now implemented
with setenv() instead of putenv(), so Python doesn't have to handle
the environment variable memory.
@vstinner

Copy link
Copy Markdown
Member Author

Previous version of the PR, approved by @serhiy-storchaka: PR #18095

This PR no longer uses SetEnvironmentVariableW() on Windows.

@vstinner vstinner merged commit b477d19 into python:master Jan 22, 2020
@vstinner vstinner deleted the setenv2 branch January 22, 2020 21:48
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
…-18128)

If setenv() C function is available, os.putenv() is now implemented
with setenv() instead of putenv(), so Python doesn't have to handle
the environment variable memory.
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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.