Message252899
A minor issue (probably qualifies for the "easy" keyword):
All functions in msvcrtmodule.c (I'm looking at http://svn.python.org/projects/python/trunk/PC/msvcrtmodule.c) except msvcrt_putch and msvcrt_putwch properly check return values against error codes, and call one of the PyErr_Set* functions to properly bubble the error up the call stack.
_putch returns EOF on failure, and _putwch returns WEOF on failure.
Like the rest of the functions in that file, I imagine that the fix would involve something like:
if (_putch(ch) == EOF)
return PyErr_SetFromErrno(PyExc_IOError);
Note: the Python msvcrt documentation (https://docs.python.org/3/library/msvcrt.html) says:
"Changed in version 3.3: Operations in this module now raise OSError where IOError was raised."
...so if you were to backport this minor fix, you need to consider that (not sure what difference that makes).
Should I take a stab at patching this myself (I've never done this for the Python project) or shall I leave that to the devs? |
|
Date |
User |
Action |
Args |
2015-10-12 23:50:45 | Alexander Riccio | set | recipients:
+ Alexander Riccio, paul.moore, tim.golden, zach.ware, steve.dower |
2015-10-12 23:50:45 | Alexander Riccio | set | messageid: <1444693845.85.0.133666844386.issue25386@psf.upfronthosting.co.za> |
2015-10-12 23:50:45 | Alexander Riccio | link | issue25386 messages |
2015-10-12 23:50:45 | Alexander Riccio | create | |
|