[issue4841] io's close() not handling errors correctly

2012-05-25 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 83d500908ffc by Hynek Schlawack in branch '2.7': #4841: Fix FileIO constructor to honor closefd when called repeatedly http://hg.python.org/cpython/rev/83d500908ffc New changeset 8a58670048c9 by Hynek Schlawack in

[issue4841] io's close() not handling errors correctly

2012-05-25 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: I’ve committed due to haypo's wish on IRC. ;) -- resolution: - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4841 ___

[issue4841] io's close() not handling errors correctly

2012-05-25 Thread Hynek Schlawack
Changes by Hynek Schlawack h...@ox.cx: -- stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4841 ___

[issue4841] io's close() not handling errors correctly

2012-05-22 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: The reasoning is reasonable, the patch trivial LGTM, the test suite passes. Anything I’m missing, why this is still open? -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org

[issue4841] io's close() not handling errors correctly

2012-05-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Hynek, no obvious reason, it probably slipped through :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4841 ___

[issue4841] io's close() not handling errors correctly

2012-05-11 Thread Hynek Schlawack
Changes by Hynek Schlawack h...@ox.cx: -- nosy: +hynek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4841 ___ ___ Python-bugs-list mailing list

[issue4841] io's close() not handling errors correctly

2011-08-10 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4841 ___ ___

[issue4841] io's close() not handling errors correctly

2011-06-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: fileio_close.patch (for Python 3.3): Fix FileIO.__init__() to not close the file if closefd=False and the constructor is called twice (or more). -- Added file: http://bugs.python.org/file22417/fileio_close.patch

[issue4841] io's close() not handling errors correctly

2011-06-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: fileio_close.patch should maybe use os.open() (to create the fd) and os.fstat() (to check that the fd is not closed). -- ___ Python tracker rep...@bugs.python.org

[issue4841] io's close() not handling errors correctly

2011-06-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Status of this issue: - io.FileIO.close() raises IOError with Python 2.7, 3.1, 3.2 and 3.3 (e.g. if the underlying file descriptor has been closed), it doesn't with Python 2.6 - If FileIO constructor is called twice, the file is

[issue4841] io's close() not handling errors correctly

2011-06-12 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4841 ___ ___ Python-bugs-list

[issue4841] io's close() not handling errors correctly

2010-07-30 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4841 ___ ___ Python-bugs-list

[issue4841] io's close() not handling errors correctly

2010-07-29 Thread Mark Lawrence
Mark Lawrence breamore...@yahoo.co.uk added the comment: Might as well close as nobody appears interested. -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4841 ___

[issue4841] io's close() not handling errors correctly

2009-01-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: 1. The handling of the error in internal_close() isn't really good. What I'm also not sure about is whether it is correct to set the error there, the old code sometimes did set an error as reaction to internal_close() failing and

[issue4841] io's close() not handling errors correctly

2009-01-07 Thread Ulrich Eckhardt
Ulrich Eckhardt eckha...@satorlaser.com added the comment: 4. I wonder if internal_close() should reset only the 'fd' field or if it should also reset 'readable', 'writable', 'seekable' seekable(), readable() and writable() raise an error if the file is closed. I think it's fine to leave

[issue4841] io's close() not handling errors correctly

2009-01-05 Thread Ulrich Eckhardt
Ulrich Eckhardt eckha...@satorlaser.com added the comment: I have a patch here which passes the proposed change to the tests in trunk. A few notes up front though, since the patch isn't good yet: 1. The handling of the error in internal_close() isn't really good. What I'm also not sure about is

[issue4841] io's close() not handling errors correctly

2009-01-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Strangely enough, it works in py3k. -- nosy: +pitrou priority: - critical stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4841

[issue4841] io's close() not handling errors correctly

2009-01-05 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: In Python 3.x, internal_close() returns -1 on error (close() returns a negative value) and 0 on success. It tests if close() returns a negative In Python 2.x, internal_closes() returns the errno value of close() on error, or 0 on

[issue4841] io's close() not handling errors correctly

2009-01-05 Thread Ulrich Eckhardt
New submission from Ulrich Eckhardt eckha...@satorlaser.com: In _fileio.c, there is the following comment: Returns 0 on success, errno (which is 0) on failure. The problem here is the claim that errno ever was less than zero, which is simply wrong. You can see this being a problem with the

[issue4841] io's close() not handling errors correctly

2009-01-05 Thread Ulrich Eckhardt
Ulrich Eckhardt eckha...@satorlaser.com added the comment: This adds a test that the close() correctly fails with an IOError. -- keywords: +patch Added file: http://bugs.python.org/file12593/python-2.7-fileio-close-test.0.patch ___ Python tracker

[issue4841] io's close() not handling errors correctly

2009-01-05 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4841 ___ ___ Python-bugs-list mailing list

[issue4841] io's close() not handling errors correctly

2009-01-05 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: In Python 3.x, internal_close() returns -1 on error (if close() returns a negative value) and 0 on success. In Python 2.x, internal_closes() returns the errno value of close() on error, or 0 on success. fileio_close() tests if the