[issue4233] open(0, closefd=False) prints 3 warnings

2009-01-29 Thread STINNER Victor
STINNER Victor added the comment: This issue has been fixed in py3k, release30-maint and trunk. I think that 2.6.x doesn't need this API change, so I prefer to close this issue. Reopen the issue if I'm wrong. -- status: open -> closed ___ Python tr

[issue4233] open(0, closefd=False) prints 3 warnings

2008-12-05 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: 2.6.1 is released. Should this issue be apply to 2.6.x or not? ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue4233] open(0, closefd=False) prints 3 warnings

2008-11-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Backported to trunk in r67307. But -- do we really want to backport to 2.6? This changes the semantics of closefd, adds a new closefd attribute... Did the rules change for 2.6.1? ___ Python tracker

[issue4233] open(0, closefd=False) prints 3 warnings

2008-11-12 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Yes, it should. I've lefted the bug open for this very reason. ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue4233] open(0, closefd=False) prints 3 warnings

2008-11-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Can this change be backported to 2.6 and 2.7? r67106 says that it "Changed semantic of close() on file objects with closefd=False". ___ Python tracker <[EMAIL PROTECTED]>

[issue4233] open(0, closefd=False) prints 3 warnings

2008-11-05 Thread Christian Heimes
Changes by Christian Heimes <[EMAIL PROTECTED]>: -- priority: release blocker -> high versions: +Python 2.6, Python 2.7 -Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue4233] open(0, closefd=False) prints 3 warnings

2008-11-05 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Applied in r67106 (py3k) The patch must be backported to 2.6 and 2.7. -- assignee: -> christian.heimes resolution: accepted -> fixed type: -> behavior ___ Python tracker <[EMAIL PROTECTED]>

[issue4233] open(0, closefd=False) prints 3 warnings

2008-11-05 Thread Barry A. Warsaw
Barry A. Warsaw <[EMAIL PROTECTED]> added the comment: Small typo, conveyed to Crys_ in irc. -- nosy: +barry resolution: -> accepted ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue4233] open(0, closefd=False) prints 3 warnings

2008-11-04 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Here is a new patch with doc and NEWS updates. Added file: http://bugs.python.org/file11944/fileio_closefd4.patch ___ Python tracker <[EMAIL PROTECTED]> ___

[issue4233] open(0, closefd=False) prints 3 warnings

2008-10-31 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Another patch based on Victor's patch. It adds some additional tests and exposes the internal attribute closefd. Added file: http://bugs.python.org/file11923/fileio_closefd3.patch ___ Python tracker <[EM

[issue4233] open(0, closefd=False) prints 3 warnings

2008-10-31 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11921/fileio_closefd.patch ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue4233] open(0, closefd=False) prints 3 warnings

2008-10-31 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: christian just told me that my svn repos was old. Here is an updated version of my patch. I now use io.open() instead of io.BufferedReader() in the tests. Added file: http://bugs.python.org/file11922/fileio_closefd-2.patch

[issue4233] open(0, closefd=False) prints 3 warnings

2008-10-31 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: @christian: Your patch doesn't work: if close() if called twice, the file is really closed :-/ Here is a new patch: - _FileIO.close() sets self->fd to -1 but don't show a warning anymore because the operation is valid: it does really close

[issue4233] open(0, closefd=False) prints 3 warnings

2008-10-31 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: I don't see a good 'n easy way to fix the issue. close() is called in too many places and I don't wanna add more checks in Python code. This patch reduces the mass of warnings to one, but it also changes the semantic of close() a bit. Howe

[issue4233] open(0, closefd=False) prints 3 warnings

2008-10-29 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: This happens with a recent py3k build: >>> x = open(0, closefd=False) >>> del x C:\dev\python\py3k\lib\io.py:1461: RuntimeWarning: Trying to close unclosable fd! self.buffer.close() C:\dev\python\py3k\lib\io.py:389: RuntimeWarning: