Skip to content

Commit

Permalink
Update to CPython 3.12 and Numpy 1.26 (#2)
Browse files Browse the repository at this point in the history
Also update to the latest Scala and JUnit Jupiter API and fix resulting
compile-errors.

Co-authored-by: Hannes Wellmann <[email protected]>
  • Loading branch information
HannesWell and iils-hwellmann authored Aug 25, 2024
1 parent 2c740d1 commit 5f11881
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>numpy</artifactId>
<version>1.18.2-1.5.3</version>
<version>1.26.3-1.5.10</version>
</dependency>

<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>numpy-platform</artifactId>
<version>1.18.2-1.5.3</version>
<version>1.26.3-1.5.10</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.scala-lang.modules</groupId>
<artifactId>scala-java8-compat_2.13</artifactId>
<version>0.9.1</version>
<version>1.0.2</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.7.1</version>
<version>5.11.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/bytedeco/embeddedpython/PyTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.bytedeco.cpython.PyObject;
import org.bytedeco.cpython.PyTypeObject;
import org.bytedeco.cpython.global.python;

import static org.bytedeco.cpython.global.python.*;
import static org.bytedeco.numpy.global.numpy.*;
Expand Down Expand Up @@ -30,7 +31,7 @@ private PyTypes() {
}

static PyTypeObject Py_TYPE(PyObject ob) {
return ob.ob_type();
return python.Py_TYPE(ob);
}

static boolean Py_IS_TYPE(PyObject ob, PyTypeObject type) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/bytedeco/embeddedpython/Python.java
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ private static void putPyObject(String name, PyObject obj) {

private static Object toJava(PyObject obj, TypeTreeBuilder builder) {
PyObject iterator;
PyTypeObject t = obj.ob_type();
PyTypeObject t = PyTypes.Py_TYPE(obj);
if (PyNone_Check(obj)) {
builder.addType("None");
return null;
Expand Down

0 comments on commit 5f11881

Please sign in to comment.