Message275003
+++ b/Lib/test/test_winconsoleio.py
+to real people with real keyborads.
Should be keyboards
There are still assert_() calls in this file (1602_6.patch). Did you miss them?
+++ b/Lib/io.py
+from _io import WindowsConsoleIO
+__all__.append('WindowsConsoleIO')
I think you should either document this class, or remove it from __all__ to clarify it is just an implementation detail.
+++ b/Modules/_io/winconsoleio.c
+_io_WindowsConsoleIO___init___impl
+ PyObject *decodedname = Py_None;
+ Py_INCREF(decodedname);
+ int d = PyUnicode_FSDecoder(nameobj, (void*)&decodedname);
Won’t this leak a reference to Py_None?
(Also, I think needless casting like in the last line can mask mistakes that the compiler would otherwise pick up. Imagine if you got the parameters around the wrong way.)
+read_console_w(HANDLE handle, DWORD maxlen, DWORD *readlen) {
+ /* If we didn't read a full buffer that time, don't try
+ again or we will block a second time. */
I’m not familiar with the Windows APIs involved, but this doesn’t seem robust. What if there were exactly one full buffer waiting, would the next call block without returning anything? |
|
Date |
User |
Action |
Args |
2016-09-08 12:10:06 | martin.panter | set | recipients:
+ martin.panter, lemburg, mhammond, terry.reedy, paul.moore, tzot, amaury.forgeotdarc, ncoghlan, pitrou, giampaolo.rodola, tim.golden, mark, ned.deily, christoph, ezio.melotti, v+python, hippietrail, ssbarnea, flox, davidsarah, santoso.wijaya, akira, David.Sankel, smerlin, lilydjwg, berker.peksag, piotr.dobrogost, Drekin, steve.dower, wiz21, stijn, Jonitis, gurnec, escapewindow, dead1ne |
2016-09-08 12:10:06 | martin.panter | set | messageid: <1473336606.49.0.409277867741.issue1602@psf.upfronthosting.co.za> |
2016-09-08 12:10:06 | martin.panter | link | issue1602 messages |
2016-09-08 12:10:06 | martin.panter | create | |
|