Issue #28427: old keys should not remove new values from
WeakValueDictionary when collecting from another thread.
diff --git a/Include/dictobject.h b/Include/dictobject.h
index ef524a4..5a1e9fe 100644
--- a/Include/dictobject.h
+++ b/Include/dictobject.h
@@ -111,6 +111,9 @@
 PyAPI_FUNC(PyObject *) _PyDict_GetItemWithError(PyObject *mp, PyObject *key);
 PyAPI_FUNC(int) PyDict_SetItem(PyObject *mp, PyObject *key, PyObject *item);
 PyAPI_FUNC(int) PyDict_DelItem(PyObject *mp, PyObject *key);
+PyAPI_FUNC(int) _PyDict_DelItemIf(PyObject *mp, PyObject *key,
+                                  int (*predicate)(PyObject *value));
+
 PyAPI_FUNC(void) PyDict_Clear(PyObject *mp);
 PyAPI_FUNC(int) PyDict_Next(
     PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value);