This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author p-ganssle
Recipients p-ganssle, vstinner
Date 2019-07-04.20:29:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1562272164.16.0.880170642341.issue37499@roundup.psfhosted.org>
In-reply-to
Content
Currently, `test_pycfunction` picks a few built-in functions with various calling conventions to exercise all the relevant code paths:

        for py_name, py_args, c_name, expected_frame_number in (
            ('gmtime', '', 'time_gmtime', 1),  # METH_VARARGS
            ('len', '[]', 'builtin_len', 2),  # METH_O
            ...

See: https://github.com/python/cpython/blob/2f19e82fbe98ce86bcd98a176328af2808b678e8/Lib/test/test_gdb.py#L851

These calling conventions are not a guaranteed part of the interface, and as such these tests are fragile (as we saw in GH-14311, when converting the time module to use Argument Clinic changed gmtime from METH_VARARGS to METH_FASTCALL). Per Victor's suggestion in GH-14330, I think we should expose a few test functions in the `testcapi` module as exemplars of their respective calling conventions and use those, rather than arbitrary builtins.
History
Date User Action Args
2019-07-04 20:29:24p-gansslesetrecipients: + p-ganssle, vstinner
2019-07-04 20:29:24p-gansslesetmessageid: <1562272164.16.0.880170642341.issue37499@roundup.psfhosted.org>
2019-07-04 20:29:24p-gansslelinkissue37499 messages
2019-07-04 20:29:23p-gansslecreate