[issue30627] Incorrect error message for a few functions called with keywod argument

2017-06-15 Thread SylvainDe

Changes by SylvainDe :


--
pull_requests: +2263

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30627] Incorrect error message for a few functions called with keywod argument

2017-06-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30627] Incorrect error message for a few functions called with keywod argument

2017-06-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Good catch SylvainDe!

You already opened a new ticked and old tickets are closed, so that let fix 
remaining issues here.

This issue is related to _PyArg_NoKeywords() and _PyArg_NoStackKeywords(), so 
it is enough to just check all usages of these functions. Most of them are in 
generated code and already fixed.

Tests for all these functions are not required.

--
components: +Extension Modules
nosy: +serhiy.storchaka
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30627] Incorrect error message for a few functions called with keywod argument

2017-06-10 Thread SylvainDe

SylvainDe added the comment:

(Also, I suspect introspection could be used to know if the same bug is still 
lying somewhere: get all objects (using gc?), keep callables with no __code__ 
member only, call with keyword argument, check error.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30627] Incorrect error message for a few functions called with keywod argument

2017-06-10 Thread SylvainDe

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com