Message335858
I've put *a* fix in there by introducing a new wrapper function. Ideally we would just point the C API at the argument clinic-generated function, but because it takes a single positional argument the argument clinic outputs a METH_O function instead of METH_VARARGS.
I think these are the options:
1. Modify the argument clinic spec to force METH_VARARGS for a single positional argument taking an object - if that's possible.
2. Maintain a wrapper function for the C API that just unpacks the tuple and passes it to the date_fromtimestamp function that the argument clinic is *also* wrapping.
3. Revert the argument clinic change and manually manage the date_fromtimestamp function as a METH_VARARGS classmethod.
I don't know enough about the argument clinic to know if #1 is feasible, if it is and someone can point me in the right direction, I can update my PR. If not, I think I mildly prefer #2, since maintaining a thin wrapper that unpacks a tuple is not terribly difficult compared to maintaining the method definition stuff.
Since this was an accidental break in the C API, I've marked it as a release blocker. |
|
Date |
User |
Action |
Args |
2019-02-18 18:14:38 | p-ganssle | set | recipients:
+ p-ganssle, belopolsky, petr.viktorin, lukasz.langa, serhiy.storchaka |
2019-02-18 18:14:38 | p-ganssle | set | messageid: <1550513678.72.0.151837484281.issue36025@roundup.psfhosted.org> |
2019-02-18 18:14:38 | p-ganssle | link | issue36025 messages |
2019-02-18 18:14:38 | p-ganssle | create | |
|