Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Modules/_functoolsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ partial_call(partialobject *pto, PyObject *args, PyObject *kw)
Py_XINCREF(kwappl);
}
else {
/* bpo-27840, bpo-29318: dictionary of keyword parameters must be
copied, because a function using "**kwargs" can modify the
dictionary. */
kwappl = PyDict_Copy(pto->kw);
if (kwappl == NULL) {
Py_XDECREF(argappl);
Expand Down
4 changes: 2 additions & 2 deletions Objects/call.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ _PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs,
if (nk != 0) {
Py_ssize_t pos, i;

/* Issue #29318: Caller and callee functions must not share the
dictionary: kwargs must be copied. */
/* bpo-29318, bpo-27840: Caller and callee functions must not share
the dictionary: kwargs must be copied. */
kwtuple = PyTuple_New(2 * nk);
if (kwtuple == NULL) {
return NULL;
Expand Down