#12 Replace deprecated PyEval_CallObject() (RHBZ#2245816)
Merged a month ago by gui1ty. Opened a month ago by gui1ty.
rpms/ gui1ty/gdcm three_thirteen  into  rawhide

file added
+40
@@ -0,0 +1,40 @@ 

+ From 37a7a2e60e310056553a39d1fd9a9fda6e565e7b Mon Sep 17 00:00:00 2001

+ From: Sandro <devel@penguinpee.nl>

+ 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,

file modified
+2
@@ -22,6 +22,8 @@ 

  Patch1: 0001-3.0.1-Use-copyright.patch

  # Fix for 1687233

  Patch2: 0002-Fix-export-variables.patch

+ # Python 3.13: Replace deprecated PyEval_CallObject()

+ Patch3:     https://github.com/malaterre/GDCM/pull/171.patch

  

  BuildRequires:  CharLS-devel >= 2.2

  BuildRequires:  cmake

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/b10cec290bc643238907a9567835fa4d

Pull-Request has been merged by gui1ty

a month ago
Metadata