STINNER Victor added the comment: Here is a patch adding a new _Py_fstat() function which uses signed 64-bit integer to store the file size and so is not limited to 2 GB files. I just moved the code from posixmodule.c to fileutils.c.
The patch replaces calls to fstat() with _Py_stat() (and also change the stat structure to _Py_stat_struct). I didn't modified _Py_stat() which calls _wstat() on Windows and so also have this issue (limited to 2 GB files on Windows). _Py_stat() is called in zipimport.c, so zipped packages are limited to 2 GB on Windows. I don't know if it's a severe issue or not. os.stat() implementation is more complex than os.fstat() on Windows. I'm unable to test my patch on Windows because Visual Studio 2010 is unable to open the new PCbuild/pcbuild.sln: see my comment on the issue #22919. ---------- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file37639/py_fstat.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23152> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com