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
É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.
--
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':
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
É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
___
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
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
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
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10053
___
___
Python-bugs-list
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
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
___
11 matches
Mail list logo