Skip to content

Commit d13d5ca

Browse files
authored
arcadedb-jvm on Python 3.11: take jpype1 1.8.1, leave out only 1.8.0 (#557)
* arcadedb-jvm on Python 3.11: take jpype1 1.8.1, leave out only 1.8.0 (#556) jpype1 1.8.1 fixes the 3.11 segmentation fault of #536 (jpype-project/jpype#1612). The pyproject comment said the <1.8 cap goes when a newer jpype1 passes tests/test_jpype_bare_exceptions.py on 3.11; 1.8.1 passes the three cases locally (0 of 15 runs crashed, 15 of 15 with 1.8.0). !=1.8.0 instead of no limit so a lock that holds 1.8.0 on 3.11 moves off it. The 3.15 floor stays. Native parity repeats the limit and changes with it; the docs advice for published releases becomes uv add "jpype1!=1.8.0". * jpype1 1.8.0 is yanked: floor 1.8.1 on Python 3.15 (#556) PyPI yanked 1.8.0 for the 3.10/3.11 segfault. Ranges already skip it, but the 3.15 floor named it and the dependency-floor audit resolves lowest-direct, so the floor moves to 1.8.1. Docs that name the 3.15 requirement and the two win_arm64 notes say 1.8.1 (it still has no win_arm64 wheel).
1 parent 00b375c commit d13d5ca

10 files changed

Lines changed: 30 additions & 27 deletions

File tree

‎.github/workflows/test-jvm.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ jobs:
805805
echo "**Legs**: a push to main, the nightly run, a manual run, a release and a pull request with the label ci:full run every platform. The jobs of this run list its legs." >> $GITHUB_STEP_SUMMARY
806806
echo "" >> $GITHUB_STEP_SUMMARY
807807
echo "ℹ️ **Note**: Some platform/Python combinations are excluded from testing on every event:" >> $GITHUB_STEP_SUMMARY
808-
echo "- Windows ARM64 (GitHub-hosted windows-11-arm runners exist, but jpype1 1.8.0 ships no win_arm64 wheel and GraalVM CE 25.4.4.1.1 has no Windows ARM64 build, so neither package can be built there)" >> $GITHUB_STEP_SUMMARY
808+
echo "- Windows ARM64 (GitHub-hosted windows-11-arm runners exist, but jpype1 1.8.1 ships no win_arm64 wheel and GraalVM CE 25.4.4.1.1 has no Windows ARM64 build, so neither package can be built there)" >> $GITHUB_STEP_SUMMARY
809809
echo "- macOS x86_64 (temporarily disabled)" >> $GITHUB_STEP_SUMMARY
810810
else
811811
echo "❌ **Some legs failed testing**" >> $GITHUB_STEP_SUMMARY

‎.github/workflows/test-native.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -747,9 +747,9 @@ jobs:
747747
# Linux and macOS stay strict. The harness marks a passing retry FLAKY-CRASH and the crash-report job logs it.
748748
retry=()
749749
if [ "$RUNNER_OS" = Windows ]; then retry=(--retry-crash); fi
750-
# jpype1 1.8.0 ends the process on CPython 3.11 (issue 536); the cap of pyproject.toml does not reach this install, so
751-
# it is repeated here. Remove both together, when a newer jpype1 passes tests/test_jpype_bare_exceptions.py on 3.11.
752-
jpype=(--with "jpype1<1.8; python_version < '3.12'" --with "jpype1; python_version >= '3.12'")
750+
# jpype1 1.8.0 ends the process on CPython 3.11 (issue 536) and 1.8.1 fixes it; the exclusion of pyproject.toml does
751+
# not reach this install, so it is repeated here. Remove both together.
752+
jpype=(--with "jpype1!=1.8.0")
753753
# macOS runs bash 3.2: under set -u an empty "${limit[@]}" is "unbound variable", so expand it only when set
754754
uv run --no-project --python "$PY" --with "$w" --with pytest --with setuptools --with numpy --with requests "${jpype[@]}" --with pyarrow \
755755
--with polars --with pandas --with duckdb --with networkx --with "psycopg[binary]" --with adbc-driver-postgresql \

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ uv add arcadedb-jvm # JVM, for heavy long-running loads
4747

4848
> Old names: `arcadedb-jvm` was formerly `arcadedb-embedded`, and `arcadedb` was formerly `arcadedb-embedded-native` (archived on PyPI). The last `arcadedb-embedded` release, 26.11.1, is a deprecation shim: it installs `arcadedb`, the native build, and warns once at import. It does not install `arcadedb-jvm`.
4949
50-
- Python: both packages support 3.11 to 3.15 (`requires-python` is `>=3.11`, with no upper bound). On Python 3.15 `arcadedb-jvm` installs JPype 1.8.0 or later. On Python 3.11 it installs JPype below 1.8, because 1.8.0 can crash the process there; with a release up to 26.11.1.post4, run `uv add "jpype1<1.8"` in your project. Each release builds and tests both packages on Python 3.11 to 3.15 on all four platforms below. Between releases, `main` and the nightly run test `arcadedb` on 3.12 and 3.15 on every platform (with a short subset on 3.11, 3.13, and 3.14), and `arcadedb-jvm` on 3.11 to 3.15 on Linux x86-64 and on 3.11 and 3.15 on the other three. A pull request runs Linux x86-64 only, and the other platforms when it carries the label `ci:full` ([CONTRIBUTING](https://github.com/ArcadeData/arcadedb-python/blob/main/CONTRIBUTING.md#what-ci-runs)). The examples are not run on 3.15 yet: three compiled dependencies of `py7zr`, which they use, have no 3.15 wheel.
50+
- Python: both packages support 3.11 to 3.15 (`requires-python` is `>=3.11`, with no upper bound). On Python 3.15 `arcadedb-jvm` installs JPype 1.8.1 or later. On Python 3.11 it leaves out JPype 1.8.0, which can crash the process there (1.8.1 fixes it); with a release up to 26.11.1.post4, run `uv add "jpype1!=1.8.0"` in your project (it replaces the `jpype1<1.8` limit that this page gave before). Each release builds and tests both packages on Python 3.11 to 3.15 on all four platforms below. Between releases, `main` and the nightly run test `arcadedb` on 3.12 and 3.15 on every platform (with a short subset on 3.11, 3.13, and 3.14), and `arcadedb-jvm` on 3.11 to 3.15 on Linux x86-64 and on 3.11 and 3.15 on the other three. A pull request runs Linux x86-64 only, and the other platforms when it carries the label `ci:full` ([CONTRIBUTING](https://github.com/ArcadeData/arcadedb-python/blob/main/CONTRIBUTING.md#what-ci-runs)). The examples are not run on 3.15 yet: three compiled dependencies of `py7zr`, which they use, have no 3.15 wheel.
5151
- Linux x86_64 and ARM64, macOS on Apple Silicon, Windows x86_64, for both packages. The Windows wheel of `arcadedb` is the newest.
5252
- Import name: `arcadedb`. Check which package you have with `python -c "import arcadedb; print(arcadedb.__backend__)"`. It prints `native` or `jvm`.
5353
- Optional extras: `arrow`, `pandas`, `polars`, `vector` for `arcadedb-jvm`; `numpy`, `arrow`, `pandas`, `polars` for `arcadedb`.

‎docs/modules/ROOT/pages/development/ci.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ The wheel of `arcadedb-jvm` is tagged `py3-none-<platform>` (`setup.py`), like t
6565
* `Build arcadedb-jvm wheel (<platform>)` builds the wheel once for each platform and uploads it as `wheel-<platform>`. `scripts/verify_wheel_tag.py` fails the build when the wheel is not `py3-none-<platform>`.
6666
* `Test arcadedb (<platform>, Python <version>)` downloads that wheel and runs the tests on one Python in a throwaway `uv run --no-project --with "<wheel>[test]" python -m pytest` environment. It builds nothing. The release publishes these same four files.
6767

68-
The `requires-python` of the package is `>=3.11`, with no upper bound. The classifiers and `scripts/select_matrix.py` say which Pythons are tested. `pyproject.toml` asks for `jpype1` 1.8.0 or later on 3.15, so that an installer never compiles JPype from its source archive there.
68+
The `requires-python` of the package is `>=3.11`, with no upper bound. The classifiers and `scripts/select_matrix.py` say which Pythons are tested. `pyproject.toml` asks for `jpype1` 1.8.1 or later on 3.15, so that an installer never compiles JPype from its source archive there.
6969

7070
[[what-runs]]
7171
== What runs when

‎docs/modules/ROOT/pages/installation.adoc‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ NOTE: *First release.* The first release of this layout is 26.11.1, and both pac
3131
// REMOVE WHEN: the old arcadedb-embedded* shims are retired and two releases have shipped with the two-package layout allow-old-name
3232
NOTE: *Old names.* The JVM package was formerly `arcadedb-embedded`. It is now `{jvm-pkg-name}`, the same build. The native package was formerly `arcadedb-embedded-native`. It is now `{native-pkg-name}`, and the old project is archived. The last `arcadedb-embedded` release, 26.11.1, is a shim that installs `{native-pkg-name}` and warns once at import. It does not install `{jvm-pkg-name}`. See xref:which-package.adoc#old-names[Old names].
3333

34-
The JVM package is self-contained. It carries a Java 25 runtime for its platform, so you do not install Java. Its only Python dependency is `JPype1` 1.5.0 or later (the Java-Python bridge), which `uv add` installs with it. On Python 3.11 it stays below 1.8: there `JPype1` 1.8.0 ends the process with a segmentation fault when Python raises certain exceptions inside it, for example when Ctrl-C arrives during a query. The native package needs no Java and no JPype. Optional extras install the columnar helpers of the native package: `[numpy]`, `[arrow]`, `[pandas]` and `[polars]`.
34+
The JVM package is self-contained. It carries a Java 25 runtime for its platform, so you do not install Java. Its only Python dependency is `JPype1` 1.5.0 or later (the Java-Python bridge), which `uv add` installs with it. On Python 3.11 it leaves out `JPype1` 1.8.0, which ends the process there with a segmentation fault when Python raises certain exceptions inside it, for example when Ctrl-C arrives during a query. `JPype1` 1.8.1 fixes it. The native package needs no Java and no JPype. Optional extras install the columnar helpers of the native package: `[numpy]`, `[arrow]`, `[pandas]` and `[polars]`.
3535

36-
// REMOVE WHEN: 26.12.1 is old enough that no supported release accepts JPype1 1.8 on Python 3.11
37-
NOTE: *Releases up to 26.11.1.post4 on Python 3.11.* These releases of `{jvm-pkg-name}`, the 26.12.1 pre-releases up to 26.12.1.dev2, and the releases under the former JVM package name (xref:which-package.adoc#old-names[Old names]) up to 26.10.2.post1 (also on Python 3.10) accept `JPype1` 1.8.0. Add the limit to your own project with `uv add "jpype1<1.8"`. Python 3.12 and later do not need it.
36+
// REMOVE WHEN: 26.12.1 is old enough that no supported release accepts JPype1 1.8.0 on Python 3.11
37+
NOTE: *Releases up to 26.11.1.post4 on Python 3.11.* These releases of `{jvm-pkg-name}`, the 26.12.1 pre-releases up to 26.12.1.dev2, and the releases under the former JVM package name (xref:which-package.adoc#old-names[Old names]) up to 26.10.2.post1 (also on Python 3.10) accept `JPype1` 1.8.0. PyPI has yanked 1.8.0, so a new install takes 1.8.1 or later, which has the fix; a project that pins 1.8.0 exactly or holds it in a lock file keeps it. To keep 1.8.0 out of your own project, run `uv add "jpype1!=1.8.0"`; it also replaces the `jpype1<1.8` limit that this page gave before. Python 3.12 and later do not need it.
3838

3939
[[requirements]]
4040
== Requirements
4141

42-
* Python 3.11 to 3.15 for both packages. On 3.15, `{jvm-pkg-name}` needs JPype 1.8.0 or later, the first JPype release with 3.15 wheels, and the package requires it by itself. Versions of `{jvm-pkg-name}` before 26.12.1 declare `requires-python` `<3.15`. A release tests both packages on all five versions on every platform; the runs between releases test fewer combinations (xref:development/ci.adoc[Continuous integration]).
42+
* Python 3.11 to 3.15 for both packages. On 3.15, `{jvm-pkg-name}` needs JPype 1.8.1 or later, and the package requires it by itself. JPype 1.8.0, the first release with 3.15 wheels, is yanked on PyPI. Versions of `{jvm-pkg-name}` before 26.12.1 declare `requires-python` `<3.15`. A release tests both packages on all five versions on every platform; the runs between releases test fewer combinations (xref:development/ci.adoc[Continuous integration]).
4343
* One of the four platforms below. The Windows wheel of the native build is the newest, and its test run is the least proven of the four. It needs the Microsoft Visual C++ runtime (`VCRUNTIME140.dll`), which every CPython for Windows already brings.
4444

4545
Every wheel is platform-specific and built on a native runner of its platform, so the installer needs no hint to pick the right one. Each package is one file for each platform, tagged `py3-none-<platform>`, and it serves every Python version it supports. The native wheel does so because it loads its library with `ctypes`. The JVM wheel carries a JRE for its platform, and nothing in it is compiled against CPython: JPype, its dependency, has its own wheel for each Python version.

‎docs/modules/ROOT/pages/which-package.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ The API is the same. The runtime is not. These are the differences you can plan
127127

128128
| Python versions
129129
| 3.11 to 3.15.
130-
| 3.11 to 3.15. On 3.15 it needs JPype 1.8.0 or later, which the package requires by itself.
130+
| 3.11 to 3.15. On 3.15 it needs JPype 1.8.1 or later, which the package requires by itself.
131131

132132
| Platforms
133133
| Linux x86_64 and aarch64 (glibc 2.28 or later), macOS arm64, Windows x64. The Windows wheel is the newest: it is built in CI, and its test run is the least proven of the four. Not built: Intel Mac, Alpine (musl), Windows on ARM. See xref:installation.adoc#requirements[Requirements].

‎pyproject.toml‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,19 @@ classifiers = [
3838
"Topic :: Software Development :: Libraries :: Python Modules",
3939
]
4040

41-
# CAP on CPython 3.11: jpype1 1.8.0 ends the process with a segmentation fault there when an exception that CPython
42-
# holds without an instance goes through JPype, such as the KeyboardInterrupt of a Ctrl-C while a query calls a Python
43-
# function, or the StopIteration of next(). CPython 3.12 and later always hold an instance and are not affected.
44-
# REMOVE THE CAP when a newer jpype1 passes tests/test_jpype_bare_exceptions.py on Python 3.11.
45-
# FLOOR on CPython 3.15: jpype1 1.8.0 is the first release with cp315 wheels. The floor keeps a resolver from taking an
46-
# older jpype1 on 3.15, which has only a source archive there and would be compiled on the user's machine.
41+
# EXCLUSION on CPython 3.11: jpype1 1.8.0 ends the process with a segmentation fault there when an exception that
42+
# CPython holds without an instance goes through JPype, such as the KeyboardInterrupt of a Ctrl-C while a query calls a
43+
# Python function, or the StopIteration of next() (issue 536, jpype-project/jpype#1612). CPython 3.12 and later always
44+
# hold an instance and are not affected. jpype1 1.8.1 fixes it (tests/test_jpype_bare_exceptions.py checks it), so only
45+
# 1.8.0 is left out: a resolver or a lock file that still holds 1.8.0 on 3.11 moves off it.
46+
# REMOVE THE EXCLUSION when the floor on 3.11 rises above 1.8.0.
47+
# FLOOR on CPython 3.15: jpype1 1.8.0 was the first release with cp315 wheels, and PyPI has yanked it for the fault
48+
# above, so the floor is 1.8.1. It keeps a resolver from taking an older jpype1 on 3.15, which has only a source
49+
# archive there and would be compiled on the user's machine.
4750
dependencies = [
48-
"jpype1>=1.5.0,<1.8; python_version < '3.12'",
51+
"jpype1>=1.5.0,!=1.8.0; python_version < '3.12'",
4952
"jpype1>=1.5.0; python_version >= '3.12' and python_version < '3.15'",
50-
"jpype1>=1.8.0; python_version >= '3.15'",
53+
"jpype1>=1.8.1; python_version >= '3.15'",
5154
]
5255

5356
[tool.uv]

‎scripts/select_matrix.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
import sys
4848

4949
# Temporarily limited to four platforms: macOS x86_64 (runner macos-15-intel) is off. Windows ARM64 (runner
50-
# windows-11-arm exists) is off because neither package can be built there: jpype1 1.8.0 ships no win_arm64 wheel
50+
# windows-11-arm exists) is off because neither package can be built there: jpype1 1.8.1 ships no win_arm64 wheel
5151
# (win_amd64 only) and GraalVM CE 25.4.4.1.1 has no Windows ARM64 build (windows-x64 only). This is the platform
5252
# column both workflows had before this script.
5353
RUNNERS = {

‎tests/test_jpype_bare_exceptions.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
33
jpype1 1.8.0 on CPython 3.11 ends the process with a segmentation fault when such an exception
44
goes through JPype's own code: the ``KeyboardInterrupt`` of a Ctrl-C, or the ``StopIteration`` of
5-
``next()``. CPython 3.12 and later always hold an instance. ``pyproject.toml`` keeps jpype1 below
6-
1.8 on CPython 3.11, and this test fails when the installed JPype has the fault.
5+
``next()``. CPython 3.12 and later always hold an instance. jpype1 1.8.1 fixes it, ``pyproject.toml``
6+
leaves out 1.8.0 on CPython 3.11, and this test fails when the installed JPype has the fault.
77
88
Each case runs in a child process, because the fault ends the process it happens in. Nothing
99
depends on timing: ``signal.raise_signal`` and ``next()`` raise at a fixed point.

‎tests/test_select_matrix.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,16 +227,16 @@ def test_pythons_match_the_classifiers_of_pyproject():
227227
assert project["requires-python"] == f">={sm.PYTHONS[0]}"
228228

229229

230-
def test_jpype1_is_capped_below_python_3_12_and_floored_on_python_3_15():
231-
# Below 3.12, jpype1 1.8.0 can end the process (tests/test_jpype_bare_exceptions.py). 1.8.0 is also the first jpype1
232-
# with cp315 wheels: an older one on 3.15 would be compiled from its source archive.
230+
def test_jpype1_skips_1_8_0_below_python_3_12_and_is_floored_on_python_3_15():
231+
# Below 3.12, jpype1 1.8.0 can end the process and 1.8.1 fixes it (tests/test_jpype_bare_exceptions.py). 1.8.0 was
232+
# also the first jpype1 with cp315 wheels and is yanked: one older than 1.8.1 on 3.15 is 1.8.0 or a source archive.
233233
project = tomllib.loads((ROOT / "pyproject.toml").read_text(encoding="utf-8"))[
234234
"project"
235235
]
236236
assert project["dependencies"] == [
237-
"jpype1>=1.5.0,<1.8; python_version < '3.12'",
237+
"jpype1>=1.5.0,!=1.8.0; python_version < '3.12'",
238238
"jpype1>=1.5.0; python_version >= '3.12' and python_version < '3.15'",
239-
"jpype1>=1.8.0; python_version >= '3.15'",
239+
"jpype1>=1.8.1; python_version >= '3.15'",
240240
]
241241

242242

0 commit comments

Comments
 (0)