GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||
GeezerVison is showing github.com — gh-120057: Add os.environ.refresh() method by vstinner · Pull Request #120059 · python/cpython Conversation
|
|
I rebased the PR to fix a merge conflict. I addressed @eryksun's and @JelleZijlstra's reviews: thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@serhiy-storchaka @erlend-aasland: Would you mind to review this change? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
What about os.environb.refresh()? Does it exist? Does it work?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@serhiy-storchaka: I addressed your review. Would you mind to review my updated PR?
I added a test on os.environb.refresh(). Yes, it works as expected :-) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Should os.environb.refresh() be documented? We perhaps do not want to attract too much attention to it, as its effect is the same as of os.environ.refresh().
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Test: use directly os.putenv().
Hum, I prefer to not document it at https://docs.python.org/dev/library/os.html#os.environb :-) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
(Ooops, I closed on [Close] instead of [Comment], sorry.) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
* Test os.unsetenv() * Document os.unsetenv() * Minor refactoring
|
@serhiy-storchaka: PR updated for os.unsetenv(). Oh, I didn't know that Python has two functions (putenv, unsetenv) which modify directly the environment without updating |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| to the environment made after this time are not reflected in :data:`os.environ`, | ||
| except for changes made by modifying :data:`os.environ` directly. | ||
|
|
||
| The :meth:`!os.environ.refresh()` method updates :data:`os.environ` with |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
FTR, the :meth: and :func: roles will implicitly add parentheses in the rendered output; you do not need to add them explicitly.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…)" This reverts commit 7aff2de. The function is controversial and it was decided to remove it.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.