From 1b6207dd3a61969310873e589c31f16f0a4126e3 Mon Sep 17 00:00:00 2001 From: Sandro Date: Fri, 19 Apr 2024 15:18:43 +0200 Subject: [PATCH] Python 3.13: Replace deprecated PyEval_CallObject() The function has been deprecated since Python 3.9 and will be removed from Python 3.13. See: https://docs.python.org/3.13/whatsnew/3.13.html#id9 --- Wrapping/Python/gdcmswig.i | 2 +- Wrapping/SWIGCommon/gdcmcommon.i | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Wrapping/Python/gdcmswig.i b/Wrapping/Python/gdcmswig.i index a2aa3760db..820178b599 100644 --- a/Wrapping/Python/gdcmswig.i +++ b/Wrapping/Python/gdcmswig.i @@ -623,7 +623,7 @@ static bool callback_helper(gdcm::DataSet const & ds1, gdcm::DataSet const & ds2 /* fail */ assert(0); } - result = PyEval_CallObject(func, arglist); + result = PyObject_CallObject(func, arglist); Py_DECREF(arglist); if (result && result != Py_None) { PyErr_SetString(PyExc_TypeError, diff --git a/Wrapping/SWIGCommon/gdcmcommon.i b/Wrapping/SWIGCommon/gdcmcommon.i index 8794bce14c..449cf8c77a 100644 --- a/Wrapping/SWIGCommon/gdcmcommon.i +++ b/Wrapping/SWIGCommon/gdcmcommon.i @@ -631,7 +631,7 @@ static bool callback_helper(gdcm::DataSet const & ds1, gdcm::DataSet const & ds2 /* fail */ assert(0); } - result = PyEval_CallObject(func, arglist); + result = PyObject_CallObject(func, arglist); Py_DECREF(arglist); if (result && result != Py_None) { PyErr_SetString(PyExc_TypeError,