[New-bugs-announce] [issue30627] Incorrect error message for a few functions called with keywod argument

SylvainDe report at bugs.python.org
Sat Jun 10 19:06:19 EDT 2017


New submission from SylvainDe:

Follow-up for http://bugs.python.org/issue30600 which is itself a follow-up for http://bugs.python.org/issue30534 . Not quite sure what the process is in that situation : creating a new ticket or updating the old one ?


After working on http://bugs.python.org/issue30600 , I thought that maybe other functions not generated by the clinic would have the same issue. "git grep _PyArg_NoStackKeywords | grep -v clinic" gave me some place to look for and indeed:

Modules/_struct.c:    if (!_PyArg_NoStackKeywords("pack", kwnames)) {
Modules/_struct.c:    if (!_PyArg_NoStackKeywords("pack_into", kwnames)) {
Python/bltinmodule.c:    if (!_PyArg_NoStackKeywords("getattr", kwnames)) {
Python/bltinmodule.c:    if (!_PyArg_NoStackKeywords("next", kwnames)) {

These four functions have a not-so-good error message when called with keyword arguments (and this is a regression compared to other Python versions)

I have a fix ready to be suggested but:

 - I want to be sure that I had to create a new ticket

 - I suspect functions defined via the GEN_CONSTRUCTOR macro in  Modules/_hashopenssl.c have the same issue but I do not know how to test it. Any help is welcome.

----------
components: Interpreter Core
messages: 295676
nosy: SylvainDe
priority: normal
severity: normal
status: open
title: Incorrect error message for a few functions called with keywod argument
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30627>
_______________________________________


More information about the New-bugs-announce mailing list