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?
to your account
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
assignee = None
closed_at = <Date 2009-12-09.00:04:04.626>
created_at = <Date 2009-12-08.19:52:31.387>
labels = ['type-bug', 'library']
title = "os.popen() objects don't support the context manager protocol"
updated_at = <Date 2009-12-09.00:04:04.625>
user = 'https://github.com/pitrou'
activity = <Date 2009-12-09.00:04:04.625>
actor = 'pitrou'
assignee = 'none'
closed = True
closed_date = <Date 2009-12-09.00:04:04.626>
closer = 'pitrou'
components = ['Library (Lib)']
creation = <Date 2009-12-08.19:52:31.387>
creator = 'pitrou'
dependencies = 
files = ['15504']
hgrepos = 
issue_num = 7461
keywords = ['patch']
message_count = 5.0
messages = ['96151', '96156', '96158', '96160', '96161']
nosy_count = 2.0
nosy_names = ['amaury.forgeotdarc', 'pitrou']
pr_nums = 
priority = 'normal'
resolution = 'fixed'
stage = 'needs patch'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue7461'
versions = ['Python 3.1', 'Python 3.2']
The text was updated successfully, but these errors were encountered:
This works under trunk but fails under py3k:
>>> import os
>>> with os.popen("ls", "r") as f:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Sorry, something went wrong.
Here is a patch+test
We should also proxy other special methods. There is __iter__, __next__,
Ah, iterating already works. Sorry for the noise.
I added a test for iterating and committed the patch in r76723 and
No branches or pull requests