Uh oh!
There was an error while loading. Please reload this page.
bpo-37540: vectorcall: keyword names must be strings - #14682
Conversation
Instead of "string", I'd say "`str` or a subclass" explicitly. |
jdemeyer
commented
Jul 15, 2019
There are many instances in the documentation (unrelated to vectorcall) where the word "string" is used. I don't see the problem here. Concrete proposal: we leave this doc as is and I will reboot #13844 (I always planned to do that, but after all other PRs that affect documentation). In the section describing the "vectorcall protocol", I will say explicitly what "string" means for vectorcall. |
jdemeyer
commented
Jul 19, 2019
Is this PR okay now or do you want me to change things? |
encukou
commented
Jul 19, 2019
@markshannon, you said you were looking at this PR. Is that still the case? Any progress? |
jdemeyer
commented
Aug 4, 2019
Ping? |
encukou
left a comment
There was a problem hiding this comment.
@markshannon seems unresponsive. I don't see an issue with this PR.
| >>> f(**{1: 3}, **{1: 5}) | ||
| Traceback (most recent call last): | ||
| ... | ||
| TypeError: f() keywords must be strings |
There was a problem hiding this comment.
I see f(**{1:2}) is still tested in test_excall.py.
There was a problem hiding this comment.
Indeed. This is testing two errors at the same time (duplicate keyword and non-string keyword). Which of the two errors you get seems arbitrary to me and this PR changes the error.
jdemeyer
commented
Aug 16, 2019
Thanks! This will help to make progress on some other PRs. |
The fact that keyword names are strings is now part of the vectorcall and `METH_FASTCALL` protocols. The biggest concrete change is that `_PyStack_UnpackDict` now checks that and raises `TypeError` if not. CC @markshannon@vstinnerhttps://bugs.python.org/issue37540
The fact that keyword names are strings is now part of the vectorcall and `METH_FASTCALL` protocols. The biggest concrete change is that `_PyStack_UnpackDict` now checks that and raises `TypeError` if not. CC @markshannon@vstinnerhttps://bugs.python.org/issue37540
The fact that keyword names are strings is now part of the vectorcall and `METH_FASTCALL` protocols. The biggest concrete change is that `_PyStack_UnpackDict` now checks that and raises `TypeError` if not. CC @markshannon@vstinnerhttps://bugs.python.org/issue37540
The fact that keyword names are strings is now part of the vectorcall and
METH_FASTCALLprotocols. The biggest concrete change is that_PyStack_UnpackDictnow checks that and raisesTypeErrorif not.CC @markshannon@vstinner
https://bugs.python.org/issue37540
Automerge-Triggered-By: @encukou