summaryrefslogtreecommitdiff
path: root/sci-libs/libsigrok/files/libsigrok-0.5.2-py313.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-12 00:08:13 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-12 00:08:13 +0100
commitf0ddcad13515f66d2f3bf827d33c277bdba7e1dd (patch)
tree3e1da8fa4626163bda62e9e8b6129867de5be46d /sci-libs/libsigrok/files/libsigrok-0.5.2-py313.patch
parent65ff3cc3bd9c3f8e718a67dfecf1f8215bf5d1d4 (diff)
gentoo auto-resync : 12:06:2024 - 00:08:13
Diffstat (limited to 'sci-libs/libsigrok/files/libsigrok-0.5.2-py313.patch')
-rw-r--r--sci-libs/libsigrok/files/libsigrok-0.5.2-py313.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/sci-libs/libsigrok/files/libsigrok-0.5.2-py313.patch b/sci-libs/libsigrok/files/libsigrok-0.5.2-py313.patch
new file mode 100644
index 000000000000..a4c1be8de96a
--- /dev/null
+++ b/sci-libs/libsigrok/files/libsigrok-0.5.2-py313.patch
@@ -0,0 +1,46 @@
+http://sigrok.org/gitweb/?p=libsigrok.git;a=commit;h=5bc8174531df86991ba8aa6d12942923925d9e72
+
+From: Gerhard Sittig <redacted>
+Date: Mon, 2 Oct 2023 16:33:08 +0000 (+0200)
+Subject: bindings/python: rephrase for Python 3.9 deprecation (call API)
+X-Git-Url: http://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=5bc8174531df86991ba8aa6d12942923925d9e72;hp=1711287ee9e5e4d37cab1cf9fcda5c98f732a137
+
+bindings/python: rephrase for Python 3.9 deprecation (call API)
+
+The PyEval_CallObject() routine was deprecated in Python 3.9, use
+PyObject_CallObject() instead which has existed since at least 3.0.
+
+There are also PyEval_InitThreads() deprecation warnings, but these
+originate from SWIG generated code and are outside of our control.
+Requires SWIG version 4.1 to silence these.
+
+Tested-By: Sascha Silbe <redacted>
+--- a/bindings/python/sigrok/core/classes.i
++++ b/bindings/python/sigrok/core/classes.i
+@@ -134,7 +134,7 @@ typedef guint pyg_flags_type;
+
+ auto arglist = Py_BuildValue("(OO)", log_obj, string_obj);
+
+- auto result = PyEval_CallObject($input, arglist);
++ auto result = PyObject_CallObject($input, arglist);
+
+ Py_XDECREF(arglist);
+ Py_XDECREF(log_obj);
+@@ -177,7 +177,7 @@ typedef guint pyg_flags_type;
+ $1 = [=] () {
+ const auto gstate = PyGILState_Ensure();
+
+- const auto result = PyEval_CallObject($input, nullptr);
++ const auto result = PyObject_CallObject($input, nullptr);
+ const bool completed = !PyErr_Occurred();
+ const bool valid_result = (completed && result == Py_None);
+
+@@ -221,7 +221,7 @@ typedef guint pyg_flags_type;
+
+ auto arglist = Py_BuildValue("(OO)", device_obj, packet_obj);
+
+- auto result = PyEval_CallObject($input, arglist);
++ auto result = PyObject_CallObject($input, arglist);
+
+ Py_XDECREF(arglist);
+ Py_XDECREF(device_obj);