Author vstinner
Recipients holdenweb, piotr.dobrogost, python-dev, vstinner
Date 2015-03-30.08:19:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hum, _Py_fstat() is not used correctly in _io.FilIO: it uses errno instead of GetLastError() to raise the OSError. It's too hard to use the new _Py_fstat() function directly, I modified it to raise directly the exception. So the caller doesn't have to use #ifdef MS_WINDOWS to raise the exception correctly.

I added _Py_fstat_noraise() when it's not possible to use an exception.

FAIL: test_fdopen (test.test_os.TestInvalidFD)
Traceback (most recent call last):
  File "C:\\3.x.kloth-win64\build\lib\test\", line 1418, in check
    f(support.make_bad_fd(), *args)
  File "C:\\3.x.kloth-win64\build\lib\", line 1028, in fdopen
    return, *args, **kwargs)
OSError: [Errno 0] Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\\3.x.kloth-win64\build\lib\test\", line 1411, in helper
    self.check(getattr(os, f))
  File "C:\\3.x.kloth-win64\build\lib\test\", line 1420, in check
    self.assertEqual(e.errno, errno.EBADF)
AssertionError: 0 != 9
Date User Action Args
2015-03-30 08:19:58vstinnersetrecipients: + vstinner, holdenweb, python-dev, piotr.dobrogost
2015-03-30 08:19:58vstinnersetmessageid: <>
2015-03-30 08:19:58vstinnerlinkissue23752 messages
2015-03-30 08:19:58vstinnercreate