This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Alexander Riccio
Recipients Alexander Riccio, paul.moore, steve.dower, tim.golden, zach.ware
Date 2015-10-12.23:50:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1444693845.85.0.133666844386.issue25386@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2015-10-12 23:50:45Alexander Ricciosetrecipients: + Alexander Riccio, paul.moore, tim.golden, zach.ware, steve.dower
2015-10-12 23:50:45Alexander Ricciosetmessageid: <1444693845.85.0.133666844386.issue25386@psf.upfronthosting.co.za>
2015-10-12 23:50:45Alexander Ricciolinkissue25386 messages
2015-10-12 23:50:45Alexander Ricciocreate