Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Fix Python 3.13.0a1
  • Loading branch information
vstinner committed Nov 14, 2023
commit 3889b052b60ea4e7cdcd36c6f7c0c326509e502a
7 changes: 4 additions & 3 deletions pythoncapi_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -1043,10 +1043,11 @@ PyDict_Pop(PyObject *dict, PyObject *key, PyObject **result)
return -1;
}

// bpo-16991 added _PyDict_Pop() to Python 3.5.0b2
#if defined(PYPY_VERSION) || PY_VERSION_HEX < 0x030500b2
// bpo-16991 added _PyDict_Pop() to Python 3.5.0b2.
// Python 3.6.0b3 changed _PyDict_Pop() first argument type to PyObject*.
// Python 3.13.0a1 removed _PyDict_Pop().
#if defined(PYPY_VERSION) || PY_VERSION_HEX < 0x030500b2 || PY_VERSION_HEX >= 0x030D0000
value = PyObject_CallMethod(dict, "pop", "O", key);
// Python 3.6.0b3 changed _PyDict_Pop() first argument type to PyObject*
#elif PY_VERSION_HEX < 0x030600b3
value = _PyDict_Pop(_Py_CAST(PyDictObject*, dict), key, NULL);
#else
Expand Down