Skip to content

Add public PyArg_ParseTupleAndKeywords API equivalent for METH_FASTCALL #144175

@rdb

Description

@rdb

Feature or enhancement

Proposal:

Opening an issue for this as requested by @vstinner in #110964.

METH_FASTCALL is part of the stable ABI as of Python 3.10. However, using it in extension module is quite difficult, because there is no equivalent API for PyArg_ParseTupleAndKeywords (which is the usual way to parse complex signatures with keywords in METH_VARARGS-style functions), and parsing vectorcall-style keywords is not a trivial problem to begin with. There used to be an undocumented public API (_PyArg_ParseStackAndKeywords) that solves this problem that is used by Argument Clinic, but it was removed from the public API as part of a wider effort to unexpose undocumented APIs in #110964.

So this issue requests a new public, stable API similar to PyArg_ParseTuple and PyArg_ParseTupleAndKeywords but accepting vectorcall-style parameters instead.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions