Package: jpy
Version: 0.9.0-3
Followup-For: Bug #999409
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch
Control: tags -1 patch

Hi Alastair,

Attached is a patch to make jpy compatible with python 3.10, which has been
uploaded to Ubuntu.

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru jpy-0.9.0/debian/patches/python-3.10.patch 
jpy-0.9.0/debian/patches/python-3.10.patch
--- jpy-0.9.0/debian/patches/python-3.10.patch  1969-12-31 16:00:00.000000000 
-0800
+++ jpy-0.9.0/debian/patches/python-3.10.patch  2021-11-17 14:03:38.000000000 
-0800
@@ -0,0 +1,19 @@
+Description: Python 3.10 compatibility
+ Py_REFCNT() is no longer an lvalue, call Py_SET_REFCNT() instead.
+Author: Steve Langasek <steve.langa...@ubuntu.com>
+Bug-Debian: https://bugs.debian.org/999409
+Last-Update: 2021-11-17
+
+Index: jpy-0.9.0/src/main/c/jpy_jobj.c
+===================================================================
+--- jpy-0.9.0.orig/src/main/c/jpy_jobj.c
++++ jpy-0.9.0/src/main/c/jpy_jobj.c
+@@ -680,7 +680,7 @@
+ 
+     typeObj = (PyTypeObject*) type;
+ 
+-    Py_REFCNT(typeObj) = 1;
++    Py_SET_REFCNT(typeObj, 1);
+     Py_TYPE(typeObj) = NULL;
+     Py_SIZE(typeObj) = 0;
+     // todo: The following lines are actually correct, but setting 
Py_TYPE(type) = &JType_Type results in an interpreter crash. Why?
diff -Nru jpy-0.9.0/debian/patches/series jpy-0.9.0/debian/patches/series
--- jpy-0.9.0/debian/patches/series     2019-07-17 04:53:58.000000000 -0700
+++ jpy-0.9.0/debian/patches/series     2021-11-17 14:02:11.000000000 -0800
@@ -3,3 +3,4 @@
 reproducible.patch
 # disable-test-failure.patch
 no-maven.patch
+python-3.10.patch
_______________________________________________
Python-modules-team mailing list
Python-modules-team@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to