Message275003
| Author |
martin.panter |
| Recipients |
David.Sankel, Drekin, Jonitis, akira, amaury.forgeotdarc, berker.peksag, christoph, davidsarah, dead1ne, escapewindow, ezio.melotti, flox, giampaolo.rodola, gurnec, hippietrail, lemburg, lilydjwg, mark, martin.panter, mhammond, ncoghlan, ned.deily, paul.moore, piotr.dobrogost, pitrou, santoso.wijaya, smerlin, ssbarnea, steve.dower, stijn, terry.reedy, tim.golden, tzot, v+python, wiz21 |
| Date |
2016年09月08日.12:10:06 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1473336606.49.0.409277867741.issue1602@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
+++ 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? |
|
History
|
|---|
| 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 |
|