◐ Shell
reader mode source ↗
Skip to content

bpo-28261: fix err msgs where PyArg_ParseTuple is used to parse normal tuples#3119

Merged
serhiy-storchaka merged 7 commits into
python:masterfrom
orenmn:bpo28261-fix-error-msgs
Aug 20, 2017
Merged

bpo-28261: fix err msgs where PyArg_ParseTuple is used to parse normal tuples#3119
serhiy-storchaka merged 7 commits into
python:masterfrom
orenmn:bpo28261-fix-error-msgs

Conversation

@orenmn

@orenmn orenmn commented Aug 17, 2017

Copy link
Copy Markdown
Contributor

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 a SystemError.)
  • socket.getnameinfo((), 42)
  • time.strftime('aoeu', ())
  • time.asctime(())
  • time.mktime(())

https://bugs.python.org/issue28261

@bedevere-bot

Copy link
Copy Markdown

A Python core developer, serhiy-storchaka, has requested some changes be
made to your pull request before we can consider merging it. If you
could please address their requests along with any other requests in
other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment
on this pull request containing the phrase I didn't expect the Spanish Inquisition!
I will then notify serhiy-storchaka along with any other core developers
who have left a review that you're ready for them to take another look
at this pull request.

@orenmn

orenmn commented Aug 18, 2017

Copy link
Copy Markdown
Contributor Author

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!

@bedevere-bot

Copy link
Copy Markdown

Nobody expects the Spanish Inquisition!

@serhiy-storchaka: please review the changes made to this pull request.

@serhiy-storchaka

Copy link
Copy Markdown
Member

I think a NEWS.d entry for this PR is not required. But you can add it if you prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants