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

2012-06-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com 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 rep...@bugs.python.org

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

2012-06-24 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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 Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za 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':

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

2012-06-21 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: Should be fixed now. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10053

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

2012-06-21 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Shouldn’t the fix be ported to _pyio? -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10053 ___

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

2012-06-21 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx 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

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

2012-06-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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 rep...@bugs.python.org

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

2012-06-09 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: Anyone? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10053 ___ ___ Python-bugs-list mailing list

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

2012-05-30 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10053 ___ ___ Python-bugs-list

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

2012-05-29 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx 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

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

2012-05-26 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +hynek versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10053 ___