[issue11965] Simplify context manager in os.popen

2013-11-06 Thread A.M. Kuchling
A.M. Kuchling added the comment: Closing this issue; I agree with Ronald's assessment. -- nosy: +akuchling resolution: -> invalid status: open -> closed ___ Python tracker ___ _

[issue11965] Simplify context manager in os.popen

2013-05-27 Thread Ronald Oussoren
Ronald Oussoren added the comment: Mark: if you know Python you can answer that question yourself by reading the code of the subprocess and os modules. >From a fairly short glance at the code I'd say that _wrap_close is not >obsolete. It is a wrapper about a file object for the stdout or stdin

[issue11965] Simplify context manager in os.popen

2013-03-30 Thread Mark Lawrence
Mark Lawrence added the comment: So is _wrap_close obsolete or not? -- nosy: +BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list

[issue11965] Simplify context manager in os.popen

2011-05-13 Thread Éric Araujo
Éric Araujo added the comment: After #12044, subprocess.Popen.__exit__ waits for process completion and closes streams. Doesn’t that make wrap_close obsolete? -- ___ Python tracker __

[issue11965] Simplify context manager in os.popen

2011-05-05 Thread Éric Araujo
Éric Araujo added the comment: Looks like I’ve misunderstood and there is no duplication. If you feel sure about it, please reject and close this report. -- ___ Python tracker ___

[issue11965] Simplify context manager in os.popen

2011-05-05 Thread Chris Rose
Chris Rose added the comment: I'm pretty sure that the os._wrap_close wrapper is not the same thing as the Popen context manager. I don't think it's useful to try refactor this. As Antoine points out, the current wrapper serves a very different purpose. -- nosy: +offby1 _

[issue11965] Simplify context manager in os.popen

2011-05-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Have you seen the comment on top of it? It says "Helper for popen() -- a proxy for a file whose close waits for the process". -- nosy: +pitrou ___ Python tracker

[issue11965] Simplify context manager in os.popen

2011-04-30 Thread Éric Araujo
New submission from Éric Araujo : Previous to 3.2, os.popen was made a context manager thanks to a private helper, os._wrap_close (contextlib.closing was maybe unavailable due to a bootstrapping issue). Now that subprocess.Popen directly implements the context manager protocol, this could be