# Bug report Originally found in https://github.com/python/cpython/issues/110782 by @mxschmitt and @JelleZijlstra This is the reproducer: ```c /*[clinic input] null_or_tuple_for_varargs name: object *constraints: object covariant: bool = False [clinic start generated code]*/ static PyObject * null_or_tuple_for_varargs_impl(PyObject *module, PyObject *name, PyObject *constraints, int covariant) /*[clinic end generated code: output=a785b35421358983 input=017dc120cb6e651b]*/ { assert(name != NULL); assert(constraints != NULL); assert(covariant == 0 || covariant == 1); Py_RETURN_NONE; } ``` When called with `name=...`, it crashes: ```python >>> import _testclinic >>> _testclinic.null_or_tuple_for_varargs('a') >>> _testclinic.null_or_tuple_for_varargs(name='a') Assertion failed: (constraints != NULL), function null_or_tuple_for_varargs_impl, file _testclinic.c, line 1148. [1] 30808 abort ./python.exe ``` I have a PR ready with the fix. CC @erlend-aasland as AC maintainer. <!-- gh-linked-prs --> ### Linked PRs * gh-110868 * gh-110922 <!-- /gh-linked-prs -->
Activity
pythongh-110864: Fix `_PyArg_UnpackKeywordsWithVararg` overwritting `…
gh-110864: Fix _PyArg_UnpackKeywordsWithVararg overwriting vararg wit…
gh-110864: TypeVar constructor: Partially revert gh-110784, `constrai…
hugovk commentedon Dec 11, 2023
@sobolevn Ready to close this issue?
pythongh-110864: Fix _PyArg_UnpackKeywordsWithVararg overwriting vara…
pythongh-110864: TypeVar constructor: Partially revert pythongh-110784,…
pythongh-110864: Fix _PyArg_UnpackKeywordsWithVararg overwriting vara…
pythongh-110864: TypeVar constructor: Partially revert pythongh-110784,…