Skip to content

[C API] Removed private _PyArg_Parser API has no replacement in Python 3.13 #112136

Closed
@vstinner

Description

@vstinner

Copy of @tacaswell's message:

aio-libs/multidict is also using _PyArg_Parser and friends (e.g. https://github.com/aio-libs/multidict/blob/18d981284b9e97b11a4c0cc1e2ad57a21c82f323/multidict/_multidict.c#L452-L456 but there are many)

The _PyArg_Parser API is used by Argument Clinic to generate efficient code parsing function arguments.

Since Python 3.12, when targeting Python internals, Argument Clinic initializes _PyArg_Parser.kwtuple with singletons objects using the _Py_SINGLETON(name) API. This API cannot be used outside Python.

Private functions with a _PyArg_Parser argument:

  • _PyArg_ParseStackAndKeywords()
  • _PyArg_ParseTupleAndKeywordsFast()
  • _PyArg_UnpackKeywords()
  • _PyArg_UnpackKeywordsWithVararg()

cc @serhiy-storchaka

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions