Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-JPype1 for openSUSE:Factory 
checked in at 2026-05-10 16:48:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-JPype1 (Old)
 and      /work/SRC/openSUSE:Factory/.python-JPype1.new.1966 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-JPype1"

Sun May 10 16:48:22 2026 rev:13 rq:1352261 version:1.7.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-JPype1/python-JPype1.changes      
2026-05-05 15:18:36.807118688 +0200
+++ /work/SRC/openSUSE:Factory/.python-JPype1.new.1966/python-JPype1.changes    
2026-05-10 16:49:15.587076294 +0200
@@ -1,0 +2,8 @@
+Sun May 10 10:03:45 UTC 2026 - Dirk Müller <[email protected]>
+
+- update to 1.7.1:
+  * Fixed null pointer dereferncing in NumPy bool instance
+    checking. #1360
+  * Required Python version is back to 3.8. #1361
+
+-------------------------------------------------------------------

Old:
----
  jpype1-1.7.0.tar.gz

New:
----
  jpype1-1.7.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-JPype1.spec ++++++
--- /var/tmp/diff_new_pack.1pjyLT/_old  2026-05-10 16:49:16.255103633 +0200
+++ /var/tmp/diff_new_pack.1pjyLT/_new  2026-05-10 16:49:16.263103961 +0200
@@ -21,7 +21,7 @@
 %bcond_with     test_jdbc
 %{?sle15_python_module_pythons}
 Name:           python-JPype1
-Version:        1.7.0
+Version:        1.7.1
 Release:        0
 Summary:        Python to Java bridge
 License:        Apache-2.0

++++++ jpype1-1.7.0.tar.gz -> jpype1-1.7.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jpype1-1.7.0/.bumpversion.cfg 
new/jpype1-1.7.1/.bumpversion.cfg
--- old/jpype1-1.7.0/.bumpversion.cfg   2022-11-09 13:37:21.000000000 +0100
+++ new/jpype1-1.7.1/.bumpversion.cfg   2022-11-09 13:37:21.000000000 +0100
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 1.7.0
+current_version = 1.7.1
 commit = True
 tag = False
 parse = 
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<build>\d+))?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jpype1-1.7.0/CMakeLists.txt 
new/jpype1-1.7.1/CMakeLists.txt
--- old/jpype1-1.7.0/CMakeLists.txt     2022-11-09 13:37:21.000000000 +0100
+++ new/jpype1-1.7.1/CMakeLists.txt     2022-11-09 13:37:21.000000000 +0100
@@ -12,26 +12,33 @@
 find_package(Python3 COMPONENTS Interpreter Development.Module REQUIRED)
 find_package(Python3 COMPONENTS Development.Embed)
 find_package(Java REQUIRED COMPONENTS Development)
-# todo: add fallback jni.h in case it aint found (no jdk required, or not 
found).
-#set(JAVA_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/native/jni_include" 
${JAVA_INCLUDE_PATH})
-find_package(JNI REQUIRED)
-include(UseJava)
+find_package(JNI)
+
+if(JNI_FOUND)
+    message(STATUS "System JNI found successfully.")
+else()
+    message(STATUS "System JNI headers not found. Falling back to bundled 
jni.h.")
+    set(JNI_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/native/jni_include")
+endif()
+
+message(STATUS "Final JNI include dirs: ${JNI_INCLUDE_DIRS}")
 
 
 if(SKBUILD)
-    message("SKBuild invocation")
-    set(DEST_JAR ${SKBUILD_PLATLIB_DIR}) # todo: jar should go to JPype Python 
package?
+    message(DEBUG "SKBuild invocation")
+    set(DEST_JAR ${SKBUILD_PLATLIB_DIR})
     set(DEST_EXTENSION ${SKBUILD_PLATLIB_DIR})
 else()
     # in-place build, set output to cmakes output dir.
-    # todo: or set it to the project root (src-dir), so the extension and jar 
are in place for direct execution.
-    # note that this is non-standard and might be surprising.
     set(DEST_JAR ${CMAKE_CURRENT_BINARY_DIR})
     set(DEST_EXTENSION ${CMAKE_CURRENT_BINARY_DIR})
 endif()
 
+message(STATUS "Destination Python extension: ${DEST_EXTENSION}")
+message(STATUS "Destination JAR: ${DEST_JAR}")
+
 if(ENABLE_BUILD_JAR)
-    message("build jar")
+    message(DEBUG "build jar")
 
     find_program(ANT_EXECUTABLE ant REQUIRED)
     # this is the build artifact of Ant.
@@ -56,7 +63,8 @@
             COMMENT "Copying ${JAR_OUTPUT} to internal destination"
     )
     add_custom_target(copy_jar ALL DEPENDS "${DEST_FILE}")
-
+    # Explicitly link targets so MSBuild doesn't run them in parallel.
+    add_dependencies(copy_jar jpype_jar)
     # finally install the jar to DEST_JAR, which makes it available for wheel 
building.
     install(
             FILES "${DEST_FILE}"
@@ -111,8 +119,8 @@
 # C++ Python extension
 include_directories(
         native/common/include
-        native/jni_include
         native/python/include
+        ${JNI_INCLUDE_DIRS}
 )
 
 set(JPYPE_NATIVE_SRC
@@ -179,10 +187,7 @@
 set_target_properties(_jpype PROPERTIES
         PREFIX ""  # remove 'lib' prefix
 )
-set_target_properties(_jpype PROPERTIES     OUTPUT_NAME "_jpype")
-
-#fixme: causes problems on osx (would need to build shared lib, not module.
-#set_target_properties(_jpype PROPERTIES VERSION "1.6.1.dev0")
+set_target_properties(_jpype PROPERTIES OUTPUT_NAME "_jpype")
 
 # Apply Windows-specific configuration
 if(WIN32)
@@ -218,4 +223,3 @@
     message(DEBUG "no skbuild env")
 endif()
 
-message("state: ${SKBUILD_STATE}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jpype1-1.7.0/PKG-INFO new/jpype1-1.7.1/PKG-INFO
--- old/jpype1-1.7.0/PKG-INFO   2022-11-09 13:37:21.000000000 +0100
+++ new/jpype1-1.7.1/PKG-INFO   2022-11-09 13:37:21.000000000 +0100
@@ -1,9 +1,9 @@
 Metadata-Version: 2.4
 Name: jpype1
-Version: 1.7.0
+Version: 1.7.1
 Summary: A Python to Java bridge
-Author-Email: Steve Menard <[email protected]>
-Maintainer-Email: Luis Nell <[email protected]>
+Author-Email: Steve Menard <[email protected]>, Karl Einar 
Nelson <[email protected]>
+Maintainer-Email: "Martin K. Scherer" <[email protected]>
 License-Expression: Apache-2.0
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.8
@@ -12,6 +12,7 @@
 Classifier: Programming Language :: Python :: 3.11
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
+Classifier: Programming Language :: Python :: 3.14
 Classifier: Topic :: Software Development
 Classifier: Topic :: Scientific/Engineering
 Project-URL: homepage, https://github.com/jpype-project/jpype
@@ -56,7 +57,7 @@
 :Documentation: `Python Docs`_
 :License: `Apache 2 License`_
 :Build status:  |TestsCI|_ |Docs|_
-:Quality status:  |Codecov|_ |lgtm_python|_ |lgtm_java|_ |lgtm_cpp|_
+:Quality status:  |Codecov|_ |codeql|_
 :Version: |PypiVersion|_ |Conda|_
 
 The work on this project began on `Sourceforge 
<http://sourceforge.net/projects/jpype/>`__.
@@ -65,11 +66,8 @@
 
 .. |alerts| image:: 
https://img.shields.io/lgtm/alerts/g/jpype-project/jpype.svg?logo=lgtm&logoWidth=18
 .. _alerts: https://lgtm.com/projects/g/jpype-project/jpype/alerts/
-.. |lgtm_python| image:: 
https://img.shields.io/lgtm/grade/python/g/jpype-project/jpype.svg?logo=lgtm&logoWidth=18&label=python
-.. _lgtm_python: https://lgtm.com/projects/g/jpype-project/jpype/context:python
-.. |lgtm_java| image:: 
https://img.shields.io/lgtm/grade/java/g/jpype-project/jpype.svg?logo=lgtm&logoWidth=18&label=java
-.. _lgtm_java: https://lgtm.com/projects/g/jpype-project/jpype/context:java
-.. |lgtm_cpp| image:: 
https://img.shields.io/lgtm/grade/cpp/g/jpype-project/jpype.svg?logo=lgtm&logoWidth=18&label=C++
+.. |codeql| image:: 
https://github.com/jpype-project/jpype/actions/workflows/codeql.yml/badge.svg
+.. _codeql: https://github.com/jpype-project/jpype/security/code-scanning
 .. _lgtm_cpp: https://lgtm.com/projects/g/jpype-project/jpype/context:cpp
 .. |PypiVersion| image:: https://img.shields.io/pypi/v/Jpype1.svg
 .. _PypiVersion: https://badge.fury.io/py/JPype1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jpype1-1.7.0/README.rst new/jpype1-1.7.1/README.rst
--- old/jpype1-1.7.0/README.rst 2022-11-09 13:37:21.000000000 +0100
+++ new/jpype1-1.7.1/README.rst 2022-11-09 13:37:21.000000000 +0100
@@ -30,7 +30,7 @@
 :Documentation: `Python Docs`_
 :License: `Apache 2 License`_
 :Build status:  |TestsCI|_ |Docs|_
-:Quality status:  |Codecov|_ |lgtm_python|_ |lgtm_java|_ |lgtm_cpp|_
+:Quality status:  |Codecov|_ |codeql|_
 :Version: |PypiVersion|_ |Conda|_
 
 The work on this project began on `Sourceforge 
<http://sourceforge.net/projects/jpype/>`__.
@@ -39,11 +39,8 @@
 
 .. |alerts| image:: 
https://img.shields.io/lgtm/alerts/g/jpype-project/jpype.svg?logo=lgtm&logoWidth=18
 .. _alerts: https://lgtm.com/projects/g/jpype-project/jpype/alerts/
-.. |lgtm_python| image:: 
https://img.shields.io/lgtm/grade/python/g/jpype-project/jpype.svg?logo=lgtm&logoWidth=18&label=python
-.. _lgtm_python: https://lgtm.com/projects/g/jpype-project/jpype/context:python
-.. |lgtm_java| image:: 
https://img.shields.io/lgtm/grade/java/g/jpype-project/jpype.svg?logo=lgtm&logoWidth=18&label=java
-.. _lgtm_java: https://lgtm.com/projects/g/jpype-project/jpype/context:java
-.. |lgtm_cpp| image:: 
https://img.shields.io/lgtm/grade/cpp/g/jpype-project/jpype.svg?logo=lgtm&logoWidth=18&label=C++
+.. |codeql| image:: 
https://github.com/jpype-project/jpype/actions/workflows/codeql.yml/badge.svg
+.. _codeql: https://github.com/jpype-project/jpype/security/code-scanning
 .. _lgtm_cpp: https://lgtm.com/projects/g/jpype-project/jpype/context:cpp
 .. |PypiVersion| image:: https://img.shields.io/pypi/v/Jpype1.svg
 .. _PypiVersion: https://badge.fury.io/py/JPype1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jpype1-1.7.0/doc/CHANGELOG.rst 
new/jpype1-1.7.1/doc/CHANGELOG.rst
--- old/jpype1-1.7.0/doc/CHANGELOG.rst  2022-11-09 13:37:21.000000000 +0100
+++ new/jpype1-1.7.1/doc/CHANGELOG.rst  2022-11-09 13:37:21.000000000 +0100
@@ -4,11 +4,17 @@
 This changelog *only* contains changes from the *first* pypi release (0.5.4.3) 
onwards.
 
 Latest Changes:
-- **1.7.0 - 2026-04-04**
-- **1.7.0.dev0 - 2026-04-04**
+- **1.7.1 - 2026-05-06**
+- **1.7.1.dev0 - 2026-04-09**
+- **1.7.1 - 2026-05-06**
+
+  - Binaries for OSX ARM64.
 
+  - Fixed null pointer dereferncing in NumPy bool instance checking. #1360
 
-- **1.6.1.dev0 - 2025-05-31**
+  - Required Python version is back to 3.8. #1361
+
+- **1.7.0 - 2026-04-04**
 
   - Fixed compatibility with NumPy 2.3 breaking change where `np.bool_` no 
longer inherits from Python `bool`. #1307
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jpype1-1.7.0/doc/release.rst 
new/jpype1-1.7.1/doc/release.rst
--- old/jpype1-1.7.0/doc/release.rst    2022-11-09 13:37:21.000000000 +0100
+++ new/jpype1-1.7.1/doc/release.rst    2022-11-09 13:37:21.000000000 +0100
@@ -30,6 +30,7 @@
           Check Python versions for Windows
           Check Python versions for OSX
           Check the manylinux image for Linux
+    - [ ] Update jpype/pyproject.toml `required-python` line to match the 
current builds.
     - [ ] Check patterns in .azure/scripts/build-wheels.sh
     - [ ] Edit doc/CHANGELOG.rst
 - [ ] Create a release candidate
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jpype1-1.7.0/jpype/__init__.py 
new/jpype1-1.7.1/jpype/__init__.py
--- old/jpype1-1.7.0/jpype/__init__.py  2022-11-09 13:37:21.000000000 +0100
+++ new/jpype1-1.7.1/jpype/__init__.py  2022-11-09 13:37:21.000000000 +0100
@@ -52,7 +52,7 @@
 __all__.extend(_jcustomizer.__all__)  # type: ignore[name-defined]
 __all__.extend(_gui.__all__)  # type: ignore[name-defined]
 
-__version__ = "1.7.0"
+__version__ = "1.7.1"
 __version_info__ = __version__.split('.')
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jpype1-1.7.0/native/common/jp_booleantype.cpp 
new/jpype1-1.7.1/native/common/jp_booleantype.cpp
--- old/jpype1-1.7.0/native/common/jp_booleantype.cpp   2022-11-09 
13:37:21.000000000 +0100
+++ new/jpype1-1.7.1/native/common/jp_booleantype.cpp   2022-11-09 
13:37:21.000000000 +0100
@@ -53,7 +53,7 @@
     {
         PyObject* obj = match.object;
 
-        if (PyBool_Check(obj) || PyObject_IsInstance(obj, 
(PyObject*)_NPBool_Type))
+        if (PyBool_Check(obj) || PyJP_IsInstanceSingle(obj, 
(PyTypeObject*)_numpy_bool_type))
         {
             match.conversion = this;
             return match.type = JPMatch::_exact;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jpype1-1.7.0/native/common/jp_classhints.cpp 
new/jpype1-1.7.1/native/common/jp_classhints.cpp
--- old/jpype1-1.7.0/native/common/jp_classhints.cpp    2022-11-09 
13:37:21.000000000 +0100
+++ new/jpype1-1.7.1/native/common/jp_classhints.cpp    2022-11-09 
13:37:21.000000000 +0100
@@ -771,18 +771,20 @@
        jvalue convert(JPMatch &match) override
        {
                PyTypeObject* type = Py_TYPE(match.object);
-               const char *name = type->tp_name;
                match.closure = JPContext_global->_java_lang_Long;
-               if (strncmp(name, "numpy", 5) == 0)
+
+               // Hot path dispatch using the numpy tree
+               PyTypeObject* nptype = PyJP_GetNumPyBaseType(type);
+               if (nptype != nullptr)
                {
-                       // We only handle specific sized types, all others go 
to long.
-                       if (strcmp(&name[5], ".int8") == 0)
-                               match.closure = 
JPContext_global->_java_lang_Byte;
-                       else if (strcmp(&name[5], ".int16") == 0)
-                               match.closure = 
JPContext_global->_java_lang_Short;
-                       else if (strcmp(&name[5], ".int32") == 0)
+                       if (nptype == (PyTypeObject*) _numpy_int32_type)
                                match.closure = 
JPContext_global->_java_lang_Integer;
+                       else if (nptype == (PyTypeObject*) _numpy_int16_type)
+                               match.closure = 
JPContext_global->_java_lang_Short;
+                       else if (nptype == (PyTypeObject*) _numpy_int8_type)
+                               match.closure = 
JPContext_global->_java_lang_Byte;
                }
+
                return JPConversionBox::convert(match);
        }
 } _boxLongConversion;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jpype1-1.7.0/native/jpype_module/pom.xml 
new/jpype1-1.7.1/native/jpype_module/pom.xml
--- old/jpype1-1.7.0/native/jpype_module/pom.xml        2022-11-09 
13:37:21.000000000 +0100
+++ new/jpype1-1.7.1/native/jpype_module/pom.xml        2022-11-09 
13:37:21.000000000 +0100
@@ -3,7 +3,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.jpype</groupId>
     <artifactId>jpype</artifactId>
-    <version>1.7.0</version>
+    <version>1.7.1</version>
     <packaging>jar</packaging>
     <dependencies>
         <dependency>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jpype1-1.7.0/native/jpype_module/src/main/java/org/jpype/JPypeContext.java 
new/jpype1-1.7.1/native/jpype_module/src/main/java/org/jpype/JPypeContext.java
--- 
old/jpype1-1.7.0/native/jpype_module/src/main/java/org/jpype/JPypeContext.java  
    2022-11-09 13:37:21.000000000 +0100
+++ 
new/jpype1-1.7.1/native/jpype_module/src/main/java/org/jpype/JPypeContext.java  
    2022-11-09 13:37:21.000000000 +0100
@@ -70,7 +70,7 @@
 public class JPypeContext
 {
 
-  public final String VERSION = "1.7.0";
+  public final String VERSION = "1.7.1";
 
   private static final JPypeContext INSTANCE = new JPypeContext();
   // This is the C++ portion of the context.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jpype1-1.7.0/native/python/include/pyjp.h 
new/jpype1-1.7.1/native/python/include/pyjp.h
--- old/jpype1-1.7.0/native/python/include/pyjp.h       2022-11-09 
13:37:21.000000000 +0100
+++ new/jpype1-1.7.1/native/python/include/pyjp.h       2022-11-09 
13:37:21.000000000 +0100
@@ -156,7 +156,11 @@
 extern PyObject *_JVMNotRunning;
 extern PyObject *PyJPClassMagic;
 // for caching type checks with Numpy bool after np version 2.1
-extern PyTypeObject *_NPBool_Type;
+extern PyObject* _num_bool_type;
+extern PyObject* _numpy_int8_type;
+extern PyObject* _numpy_int16_type;
+extern PyObject* _numpy_int32_type;
+extern PyObject* _numpy_bool_type;
 
 extern JPContext* JPContext_global;
 
@@ -182,6 +186,7 @@
 PyObject  *PyJPValue_getattro(PyObject *obj, PyObject *name);
 int        PyJPValue_setattro(PyObject *self, PyObject *name, PyObject *value);
 PyObject  *PyJPChar_Create(PyTypeObject *type, Py_UCS2 p);
+PyTypeObject* PyJP_GetNumPyBaseType(PyTypeObject* obj);
 
 #ifdef __cplusplus
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jpype1-1.7.0/native/python/pyjp_module.cpp 
new/jpype1-1.7.1/native/python/pyjp_module.cpp
--- old/jpype1-1.7.0/native/python/pyjp_module.cpp      2022-11-09 
13:37:21.000000000 +0100
+++ new/jpype1-1.7.1/native/python/pyjp_module.cpp      2022-11-09 
13:37:21.000000000 +0100
@@ -22,34 +22,17 @@
 #include <Windows.h>
 #endif
 
-namespace {
-int init_numpy_bool_type()
-{
-       JP_TRACE("init_numpy_bool_type()");
-       PyObject *numpy = PyImport_ImportModule("numpy");
-       if (numpy == nullptr) {
-               // we do not want a Python error to be propagated.
-               PyErr_Clear(); // GCOVR_EXCL_LINE
-               return -1; // GCOVR_EXCL_LINE
-       }
-
-       PyObject *t = PyObject_GetAttrString(numpy, "bool_");
-       Py_DECREF(numpy);
-       if (t == nullptr) {
-               JP_TRACE("bool_ attr not found"); // GCOVR_EXCL_LINE
-               return -1; // GCOVR_EXCL_LINE
-       }
-
-       /* store as PyTypeObject* for fast checks */
-       _NPBool_Type = (PyTypeObject *)t;
-       return 0;
-}
-
-}
-
 void PyJPModule_installGC(PyObject* module);
 
 bool _jp_cpp_exceptions = false;
+static int _numpy_typepos = 0;
+static int _numpy_genericpos = 0;
+PyObject* _numpy_generic_type = nullptr;
+PyObject* _numpy_bool_type = nullptr;
+PyObject* _numpy_int8_type  = nullptr;
+PyObject* _numpy_int16_type = nullptr;
+PyObject* _numpy_int32_type = nullptr;
+
 
 extern void PyJPArray_initType(PyObject* module);
 extern void PyJPBuffer_initType(PyObject* module);
@@ -98,7 +81,6 @@
 PyObject* _JMethodCode = nullptr;
 PyObject* _JObjectKey = nullptr;
 PyObject* _JVMNotRunning = nullptr;
-PyTypeObject* _NPBool_Type = nullptr;
 
 void PyJPModule_loadResources(PyObject* module)
 {
@@ -245,6 +227,31 @@
        return PyTuple_GetItem(mro1, n1 - n2) == (PyObject*) type;
 }
 
+PyTypeObject* PyJP_GetNumPyBaseType(PyTypeObject* type)
+{
+       PyObject* mro = type->tp_mro;
+       if (mro == nullptr || _numpy_generic_type == nullptr) return nullptr;
+
+       Py_ssize_t n = PyTuple_GET_SIZE(mro);
+
+       // 1. Check the Gate using cached generic position
+       // If n < 2, it's a raw object/type.
+       // If the item at (n - _numpy_genericpos) isn't generic, it's not NumPy.
+       if (n < _numpy_genericpos || 
+                       PyTuple_GET_ITEM(mro, n - _numpy_genericpos) != 
_numpy_generic_type)
+               return nullptr;
+
+       // 2. Resolve the concrete base (e.g., int32) using cached type position
+       // If the user subclassed it, n will be > _numpy_typepos.
+       // The base type is always at index (n - _numpy_typepos).
+       if (n >= _numpy_typepos && _numpy_typepos > 0)
+               return (PyTypeObject*) PyTuple_GET_ITEM(mro, n - 
_numpy_typepos);
+    
+       // 3. Fallback for types with shallower MROs (like bool_ or generic 
itself)
+       return type;
+}
+
+
 int PyJP_IsInstanceSingle(PyObject* obj, PyTypeObject* type)
 {
        if (type == nullptr || obj == nullptr)
@@ -631,6 +638,32 @@
        JP_PY_CATCH(nullptr); // GCOVR_EXCL_LINE
 }
 
+static void PyJPModule_InitNumpy()
+{
+    PyObject *numpy = PyImport_ImportModule("numpy");
+    if (numpy == nullptr) 
+    {
+        PyErr_Clear();
+        return;
+    }
+
+    // Do it one by one. If one fails, you can actually handle it.
+    _numpy_generic_type = PyObject_GetAttrString(numpy, "generic");
+    _numpy_bool_type    = PyObject_GetAttrString(numpy, "bool_");
+    _numpy_int8_type   = PyObject_GetAttrString(numpy, "int8");
+    _numpy_int16_type   = PyObject_GetAttrString(numpy, "int16");
+    _numpy_int32_type   = PyObject_GetAttrString(numpy, "int32");
+
+    // Check for nulls BEFORE you try to access internals
+    if (_numpy_int32_type && _numpy_generic_type)
+    {
+        _numpy_typepos = 
PyTuple_GET_SIZE(((PyTypeObject*)_numpy_int32_type)->tp_mro);
+        _numpy_genericpos = 
PyTuple_GET_SIZE(((PyTypeObject*)_numpy_generic_type)->tp_mro);
+    }
+
+    Py_DECREF(numpy);
+}
+
 
 #if 1
 // GCOVR_EXCL_START
@@ -789,7 +822,7 @@
     PyUnstable_Module_SetGIL(module, Py_MOD_GIL_NOT_USED);
 #endif
 // TODO: we should probably pass the version directly from a scikit-build 
(cmake) defined macro.
-       PyModule_AddStringConstant(module, "__version__", "1.7.0");
+       PyModule_AddStringConstant(module, "__version__", "1.7.1");
 
        // Our module will be used for PyFrame object and it is a requirement 
that
        // we have a builtins in our dictionary.
@@ -815,7 +848,7 @@
 
        _PyJPModule_trace = true;
 
-       init_numpy_bool_type();
+       PyJPModule_InitNumpy();
 
        return module;
        JP_PY_CATCH(nullptr); // GCOVR_EXCL_LINE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jpype1-1.7.0/native/python/pyjp_value.cpp 
new/jpype1-1.7.1/native/python/pyjp_value.cpp
--- old/jpype1-1.7.0/native/python/pyjp_value.cpp       2022-11-09 
13:37:21.000000000 +0100
+++ new/jpype1-1.7.1/native/python/pyjp_value.cpp       2022-11-09 
13:37:21.000000000 +0100
@@ -24,6 +24,14 @@
 {
 #endif
 
+#ifndef Py_SET_TYPE
+static inline void _Py_SET_TYPE(PyObject *ob, PyTypeObject *type)
+{
+    ob->ob_type = type;
+}
+#define Py_SET_TYPE(ob, type) _Py_SET_TYPE((PyObject*)(ob), (type))
+#endif
+
 /**
  * Internal key for the thread-local allocator type.
  */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jpype1-1.7.0/project/conda_recipe/README.md 
new/jpype1-1.7.1/project/conda_recipe/README.md
--- old/jpype1-1.7.0/project/conda_recipe/README.md     1970-01-01 
01:00:00.000000000 +0100
+++ new/jpype1-1.7.1/project/conda_recipe/README.md     2022-11-09 
13:37:21.000000000 +0100
@@ -0,0 +1,15 @@
+# Conda-Recipe
+This recipe is copied over from conda-forge/jpype1-feedstock and should be 
kept in close sync with it.
+By doing so, we ensure that upcoming releases onc Conda-Forge can be achieved 
more easily.
+
+## Prerequisites
+We recommend using `boa` and the provided wrapper `mambabuild` to speed up 
resolving the dependencies.
+
+conda install -c conda-forge boa conda-forge-pinning conda-verify
+
+
+## Run it
+This should use current compiler configurations (and due to this runtime 
restrictions for Python and libcxx etc.)
+from conda-forge itself.
+
+    conda mambabuild conda_recipe --variant-config-files 
$CONDA_PREFIX/conda_build_config.yaml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jpype1-1.7.0/project/conda_recipe/meta.yaml 
new/jpype1-1.7.1/project/conda_recipe/meta.yaml
--- old/jpype1-1.7.0/project/conda_recipe/meta.yaml     1970-01-01 
01:00:00.000000000 +0100
+++ new/jpype1-1.7.1/project/conda_recipe/meta.yaml     2022-11-09 
13:37:21.000000000 +0100
@@ -0,0 +1,66 @@
+{% set version = "0" %}
+{% set name = "JPype1" %}
+
+#### specific to this repo only:
+# obtain the version from skbuild-core somehow.
+{% set pyproject = load_file_data('pyproject.toml') %}
+{% set version = pyproject[ 'project' ][ 'version' ] %}
+####
+
+package:
+  name: {{ name|lower }}
+  version: {{ version }}
+
+source:
+  path: ../../
+
+build:
+  number: 0
+  script: {{ PYTHON }} -m pip install . -vv
+
+requirements:
+  build:
+    - python                                 # [build_platform != 
target_platform]
+    - cross-python_{{ target_platform }}     # [build_platform != 
target_platform]
+    - {{ compiler('c') }}
+    - {{ compiler('cxx') }}
+    - {{ stdlib('c') }}
+    - openjdk ==11
+    - ant
+    - cmake
+    - ninja  # [win]
+    - make  # [not win]
+
+  host:
+    - python
+    - pip
+    - scikit-build-core
+
+  run:
+    - python
+    - packaging
+
+test:
+  imports:
+    - jpype
+  commands:
+    - pip check
+    - python -c "import jpype; jpype.startJVM(); 
print(jpype.java.lang.String('hi there'));"
+  requires:
+    - pip
+    - openjdk
+
+about:
+  home: https://github.com/jpype-project/jpype
+  license: Apache-2.0
+  license_file: LICENSE
+  summary: A Python to Java bridge.
+  description: A Python to Java bridge.
+  doc_url: http://jpype.readthedocs.io/en/stable/
+
+extra:
+  recipe-maintainers:
+    - caspervdw
+    - marscher
+    - mariusvniekerk
+    - Thrameos
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jpype1-1.7.0/pyproject.toml 
new/jpype1-1.7.1/pyproject.toml
--- old/jpype1-1.7.0/pyproject.toml     2022-11-09 13:37:21.000000000 +0100
+++ new/jpype1-1.7.1/pyproject.toml     2022-11-09 13:37:21.000000000 +0100
@@ -4,12 +4,13 @@
 
 [project]
 name = "jpype1"
-version = '1.7.0'
+version = '1.7.1'
 authors = [
     {name = "Steve Menard", email = "[email protected]"},
+    {name = "Karl Einar Nelson", email = "[email protected]"},
 ]
 maintainers = [
-    {name = "Luis Nell", email = "[email protected]"},
+    {name = "Martin K. Scherer", email = "[email protected]"},
 ]
 description = "A Python to Java bridge"
 readme = "README.rst"
@@ -23,6 +24,7 @@
     'Programming Language :: Python :: 3.11',
     'Programming Language :: Python :: 3.12',
     'Programming Language :: Python :: 3.13',
+    'Programming Language :: Python :: 3.14',
     'Topic :: Software Development',
     'Topic :: Scientific/Engineering'
 ]

Reply via email to