bpo-28261: fix err msgs where PyArg_ParseTuple is used to parse normal tuples#3119
Conversation
|
A Python core developer, serhiy-storchaka, has requested some changes be Once you have made the requested changes, please leave a comment |
Sorry, something went wrong.
|
note that I also added very basic tests to test_audioop.py and to test_io.py, to verify SystemError is not raised anymore. I didn't expect the Spanish Inquisition! |
Sorry, something went wrong.
|
Nobody expects the Spanish Inquisition! @serhiy-storchaka: please review the changes made to this pull request. |
Sorry, something went wrong.
|
I think a NEWS.d entry for this PR is not required. But you can add it if you prefer. |
Sorry, something went wrong.
…y some of the code
according to http://bugs.python.org/issue28261, fix some error messages.
without this patch, each of the following calls would have produced a wrong error message (at least on Windows 10):
ctypes.CFUNCTYPE(None)(())_io.IncrementalNewlineDecoder(42, 42).setstate(())audioop.ratecv(b'a', 1, 1, 42, 42, (42, ((),)))audioop.lin2adpcm(b'a', 1, ())audioop.adpcm2lin(b'a', 1, ())_overlapped.Overlapped().ConnectEx(42, ())(also,_overlapped.Overlapped().ConnectEx(42, 43)would have caused aSystemError.)socket.getnameinfo((), 42)time.strftime('aoeu', ())time.asctime(())time.mktime(())https://bugs.python.org/issue28261