STINNER Victor added the comment: I don't see any simple solution to get a 100% reliable I/O stack on Python 2.
Python 3.5 contains a pure Python implementation of the io module: _pyio.FileIO uses os.read() and os.write(). In Python 3.4 and older, the _pyio still used io.FileIO (implemented in C). But try to recall Python 3.0 which had *very* bad I/O performance because its io module was fully implemented in pure Python! The uvloop project proved that Python can be very efficient for (network) I/O using code written with Cython. But I also know that Mercurial cares of PyPy which is not really Cython-friendly. Even if fread() bugs are fixed in Python 2.7.x+1, you will still hit bugs on Python 2.7.x and older. Maybe it can be a strong motivation to pursue your Python 3 efforts :-) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1633941> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com