You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Argument Clinic generates incorrect code for METH_METHOD methods without args #115015
Argument Clinic generates incorrect code for methods without arguments, that need the defining class (METH_METHOD). Currently, only positional arguments are checked; any keyword argument is silently accepted. This affects methods in several extension modules (see PR).
changed the title [-]Argument Clinic generated incorrect code for METH_METHOD methods without args[/-][+]Argument Clinic generates incorrect code for METH_METHOD methods without args[/+]on Feb 5, 2024
Activity
pythongh-115015: Generate correct code for METH_METHOD methods withou…
[-]Argument Clinic generated incorrect code for METH_METHOD methods without args[/-][+]Argument Clinic generates incorrect code for METH_METHOD methods without args[/+]erlend-aasland commentedon Feb 5, 2024
Repro for
ndbm:erlend-aasland commentedon Feb 5, 2024
FTR, this bug was introduced in 3.10, but I doubt this can be categorised as a security-fix, so this behaviour will probably remain in that version.
encukou commentedon Feb 5, 2024
It's a bugfix, but it's also a backwards-incompatible change, and leaving the bug in wouldn't hurt very much.
Consider only fixing it in main.
erlend-aasland commentedon Feb 5, 2024
cc. 3.12 and 3.11 RMs, @Yhg1s and @pablogsal
gh-115015: Argument Clinic: fix generated code for METH_METHOD method…
erlend-aasland commentedon Feb 5, 2024
Keeping this open until there's a decision regarding backporting.
pablogsal commentedon Feb 5, 2024
I don't mind backporting it but only if @Yhg1s agrees as I don't want 3.11 to have the fix but not 3.12
[3.12] pythongh-115015: Argument Clinic: fix generated code for METH_…
[3.12] gh-115015: Argument Clinic: fix generated code for METH_METHOD…
[3.11] gh-115015: Argument Clinic: fix generated code for METH_METHOD…
encukou commentedon Feb 12, 2024
@serhiy-storchaka, did Thomas agree with the backports?
serhiy-storchaka commentedon Feb 12, 2024
@encukou, it is an ordinary bugfix. A special permission is needed when we backport a feature or a bugfix that likely can break existing code.
pythongh-115015: Argument Clinic: fix generated code for METH_METHOD …