Skip to content
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

os.environ.clear has no effect on child processes #47477

Closed
joepcool mannequin opened this issue Jun 28, 2008 · 2 comments
Closed

os.environ.clear has no effect on child processes #47477

joepcool mannequin opened this issue Jun 28, 2008 · 2 comments
Labels
stdlib Python modules in the Lib dir

Comments

@joepcool
Copy link
Mannequin

joepcool mannequin commented Jun 28, 2008

BPO 3227
Nosy @benjaminp

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2008-06-28.20:48:22.002>
created_at = <Date 2008-06-28.18:21:54.776>
labels = ['library']
title = 'os.environ.clear has no effect on child processes'
updated_at = <Date 2008-06-28.20:48:21.992>
user = 'https://bugs.python.org/joepcool'

bugs.python.org fields:

activity = <Date 2008-06-28.20:48:21.992>
actor = 'benjamin.peterson'
assignee = 'none'
closed = True
closed_date = <Date 2008-06-28.20:48:22.002>
closer = 'benjamin.peterson'
components = ['Library (Lib)']
creation = <Date 2008-06-28.18:21:54.776>
creator = 'joe.p.cool'
dependencies = []
files = []
hgrepos = []
issue_num = 3227
keywords = []
message_count = 2.0
messages = ['68891', '68909']
nosy_count = 2.0
nosy_names = ['benjamin.peterson', 'joe.p.cool']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue3227'
versions = ['Python 2.5']

@joepcool
Copy link
Mannequin Author

joepcool mannequin commented Jun 28, 2008

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

@joepcool joepcool mannequin added the stdlib Python modules in the Lib dir label Jun 28, 2008
@benjaminp
Copy link
Contributor

This has been fixed in the upcoming Python 2.6.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

1 participant