-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-39395: os.putenv() is now always available #18135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
If this PR is merged, I plan to also require unsetenv() to build and always make os.unsetenv() available, once https://bugs.python.org/issue39413 will be fixed. |
🤖 New build scheduled with the buildbot fleet by @vstinner for commit d499e9a98444fb9dad78ca64f6ee2f42954db415 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
The PR built successfully on all tested buildbots: Linux (Ubuntu, Fedora, RHEL7, RHEL8, Gentoo, Arch Linux, ...), Windows (7, 8.1, 10, ...), macOS, FreeBSD. I checked the 3 buildbot failures: they are unrelated. |
Hum, I think I will wait until my PR #18163 is merged, so I can also require os.unsetenv() to be available in this PR. |
The os.putenv() and os.unsetenv() functions are now always available. On non-Windows platforms, Python now requires setenv() and unsetenv() functions to build. Remove putenv_dict from posixmodule.c: it's not longer needed.
I merged my PR #18163 so os.unsetenv() is now also available on Windows. I updated my PR to also require unsetenv() to build Python. setenv() and unsetenv() should be available on all platforms supported by Python. If it's not the case, someone can maintain a downstream patch which is a revert of this PR. Or we can revisit the idea of unsetting variables set by Python at exit, to workaround putenv() issue: https://bugs.python.org/issue39395 |
I'm talking about something this PR #18078 that I just closed. But only if someone asks to support a platform which doesn't provide setenv() and unsetenv(). |
The os.putenv() and os.unsetenv() functions are now always available. On non-Windows platforms, Python now requires setenv() and unsetenv() functions to build. Remove putenv_dict from posixmodule.c: it's not longer needed.
On non-Windows platforms, Python now requires setenv() to build.
https://bugs.python.org/issue39395