This is related to [python-Bugs-1648268], but I think these problems might be important enough to consider fixing prior to any patch being produced for that item.
Modules/datetimemodule.c:time_isoformat() is declared in time_methods[] as METH_KEYWORDS. However, I believe it is better declared as METH_NOARGS (calling it with args and kwargs doesn't raise any exception, but it doesn't accept them).
Objects/typeobject.c:4428 - slot_nb_inplace_power is declared with the SLOT1() macro. I'm not sure I entirely grok what's going on here (not enough to supply a python-level failure case), but it seems to me that it should be declared with the SLOT2() macro (it's a ternary op). FWIW, I changed it from:
SLOT1(slot_nb_inplace_power, "__ipow__", PyObject *, "O")
to:
SLOT2(slot_nb_inplace_power, "__ipow__", PyObject *, PyObject *, "OO")
... and that ran the failing tests OK.
Hopefully someone familiar with this code can determine if this is correct or not.
Thanks, Kev.
|