[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2021-03-17 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list

[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2019-07-29 Thread STINNER Victor
Change by STINNER Victor : -- keywords: -easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2016-04-17 Thread Josh Snider
Josh Snider added the comment: Here's a patch that raises an exception when _put[w]ch and _get[w]ch[e] are run without a console. Like Eryk Sun says, the get's work fine if you do unget before hand. -- keywords: +patch nosy: +Josh Snider Added file:

[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2015-10-22 Thread Alexander Riccio
Alexander Riccio added the comment: Sorry for the delay: Gmail actually directed the update emails to my spam folder! Gmail said (something like): "It is in violation of Google's recommended email sender guidelines." ...and it's apparently not the first time this has happened with the python

[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2015-10-15 Thread Eric V. Smith
Eric V. Smith added the comment: That's a great test, thanks. If we were designing this from scratch, I agree that raising an exception is the right thing to do. But the questions is: can we change the behavior now? I think it's unlikely that anyone is relying on these functions returning

[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2015-10-13 Thread Eric V. Smith
Eric V. Smith added the comment: Although the function names have changed (I think due to Argument Clinic), the reported issue still applies to the current code: https://hg.python.org/cpython/file/tip/PC/msvcrtmodule.c#l309 I'll let other decide if the change is actually desirable. It would

[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2015-10-13 Thread eryksun
eryksun added the comment: > It would be interesting to know under what circumstances these > functions can fail. The CRT _put[w]ch and _get[w]ch[e] functions will fail when called in a process that doesn't have a console. (Except get[w]ch may succeed if it follows unget[w]ch.) This is the

[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2015-10-12 Thread Alexander Riccio
Alexander Riccio added the comment: For your convenience, the MSDN docs for the _putch/_putwch functions: https://msdn.microsoft.com/en-us/library/azb6c04e.aspx -- ___ Python tracker

[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2015-10-12 Thread Alexander Riccio
New submission from Alexander Riccio: 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

[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2015-10-12 Thread Zachary Ware
Zachary Ware added the comment: Feel free to create a patch yourself, we'll be happy to review it. Note though that the python project on svn.python.org is old and abandoned; we moved to Mercurial several years ago (see https://hg.python.org/cpython/). I haven't checked to see whether the