FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-39395: os.putenv() is now always available by vstinner · Pull Request #18135 · python/cpython · GitHub

Repository navigation

bpo-39395: os.putenv() is now always available - #18135

Merged
vstinner merged 1 commit into
python:masterfrom
vstinner:requires_setenv
Jan 24, 2020
Merged

vstinner merged 1 commit into
python:masterfrom
vstinner:requires_setenv

Conversation

vstinner commented Jan 23, 2020 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

On non-Windows platforms, Python now requires setenv() to build.

https://bugs.python.org/issue39395

Copy link
Copy Markdown
Member Author

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.

vstinner added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 23, 2020

Copy link
Copy Markdown

🤖 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.

bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 23, 2020

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Member Author

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().

vstinner merged commit b8d1262 into python:master Jan 24, 2020
vstinner deleted the requires_setenv branch January 24, 2020 13:05
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL