Issue #28086: Single var-positional argument of tuple subtype was passed
unscathed to the C-defined function. Now it is converted to exact tuple.
diff --git a/Python/ceval.c b/Python/ceval.c
index ff36d36..39cf330 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -3310,7 +3310,7 @@
}
callargs = POP();
func = TOP();
- if (!PyTuple_Check(callargs)) {
+ if (!PyTuple_CheckExact(callargs)) {
if (Py_TYPE(callargs)->tp_iter == NULL &&
!PySequence_Check(callargs)) {
PyErr_Format(PyExc_TypeError,
@@ -3327,7 +3327,7 @@
goto error;
}
}
- assert(PyTuple_Check(callargs));
+ assert(PyTuple_CheckExact(callargs));
result = do_call_core(func, callargs, kwargs);
Py_DECREF(func);