[issue6361] I/O object wrappers shouldn't close their underlying file when deleted.

2010-08-05 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: OK I am convinced, the current behavior is fine. Let's close this one. -- resolution: -> wont fix stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker

[issue6361] I/O object wrappers shouldn't close their underlying file when deleted.

2009-06-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: You can call the detach() method if you don't want to the underlying stream to be closed. We could also add a close_parent attribute defaulting to True. -- components: +IO nosy: +benjamin.peterson, pitrou type: behavior -> feature request _

[issue6361] I/O object wrappers shouldn't close their underlying file when deleted.

2009-06-28 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti : Here's an example of the behaviour: import io def test(buf): textio = io.TextIOWrapper(buf) buf = io.BytesIO() test(buf) print(buf.closed) # This prints True currently The problem here is TextIOWrapper closes its buffer when deleted. BufferedRWP