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 2008-06-28 20:48 by benjamin.peterson. 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
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