This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: os.environ.clear has no effect on child processes
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, joe.p.cool
Priority: normal Keywords:

Created on 2008-06-28 18:21 by joe.p.cool, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg68891 - (view) Author: Joe P. Cool (joe.p.cool) Date: 2008-06-28 18:21
If I call os.environ.clear in a python program child processes still
see the cleared entries. But when I iterate over the keys like so

names =  os.environ.keys()
for k in names:
    del  os.environ[k]

then the entries are also deleted for the child processes. Where is
the difference? Is this a bug? (Observed in Python 2.5.2)

-- 
Joe
msg68909 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-06-28 20:48
This has been fixed in the upcoming Python 2.6.
History
Date User Action Args
2022-04-11 14:56:35adminsetgithub: 47477
2008-06-28 20:48:22benjamin.petersonsetstatus: open -> closed
resolution: out of date
messages: + msg68909
nosy: + benjamin.peterson
2008-06-28 18:21:54joe.p.coolcreate