[issue10053] Don’t close fd when FileIO.__init__ fails

2012-06-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Indeed, there is no pure-Python FileIO: _pyio.py imports it from C: "from _io import FileIO" -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue10053] Don’t close fd when FileIO.__init__ fails

2012-06-23 Thread Éric Araujo
Éric Araujo added the comment: I don’t know; Antoine is the io expert. I just remember that io used to be in C and was moved to _pyio for documentation and experimentation purposes, so I was sure it was a fully standalone lib but I could be mistaken. -- _

[issue10053] Don’t close fd when FileIO.__init__ fails

2012-06-21 Thread Hynek Schlawack
Hynek Schlawack added the comment: Hmmm, I thought Lib/_pyio.py actually uses Lib/_io/_fileio.c? At least I can't find the logic inside. There's no error handling at all. It just uses the FileIO object in Lib/_pyio.py:189 which it seems to get from Lib/_pyio.py:585 which I presumed was from L

[issue10053] Don’t close fd when FileIO.__init__ fails

2012-06-21 Thread Éric Araujo
Éric Araujo added the comment: Shouldn’t the fix be ported to _pyio? -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-lis

[issue10053] Don’t close fd when FileIO.__init__ fails

2012-06-21 Thread Hynek Schlawack
Hynek Schlawack added the comment: Should be fixed now. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue10053] Don’t close fd when FileIO.__init__ fails

2012-06-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 981ad5254d07 by Hynek Schlawack in branch '2.7': #10053: Don't close FDs when FileIO.__init__ fails http://hg.python.org/cpython/rev/981ad5254d07 New changeset d042bd8625f3 by Hynek Schlawack in branch '3.2': #10053: Don't close FDs when FileIO.__i

[issue10053] Don’t close fd when FileIO.__init__ fails

2012-06-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: In the test, assertNone is superfluous. Just call os.close(). However, you should probably use assertRaises to check that MyException is raised. -- ___ Python tracker ___

[issue10053] Don’t close fd when FileIO.__init__ fails

2012-06-09 Thread Hynek Schlawack
Hynek Schlawack added the comment: Anyone? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue10053] Don’t close fd when FileIO.__init__ fails

2012-05-30 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue10053] Don’t close fd when FileIO.__init__ fails

2012-05-29 Thread Hynek Schlawack
Hynek Schlawack added the comment: I think this issue is still valid. However, I’d favor the attached (simpler) patch that keeps track whether self->fd is our own (i.e. a result of an open() operation) or from outside. A couple of notes: - I'm not sure why your test skipped if the Exception

[issue10053] Don’t close fd when FileIO.__init__ fails

2012-05-26 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +hynek versions: +Python 3.3 -Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list