From 30080f11cd80b0914e292e2d1e87618db5eba769 Mon Sep 17 00:00:00 2001 From: Taewoon Kim Date: Sun, 29 Nov 2026 23:06:21 +0900 Subject: [PATCH 1/2] Python 3.15 in the full matrix of both wheels (jpype1 1.8.0 has cp315 wheels) jpype1 1.8.0 (2026-11-29) is the first release with CPython 3.15 wheels, and ladybug 0.23.0 has them too. arcadedb-jvm: requires-python loses the <3.15 cap, gets the 3.15 classifier, and asks for jpype1>=1.8.0 on 3.15 so that no installer compiles JPype there. CI: 3.15 is in PYTHONS (JVM) and ALL_PYTHONS (native). A pull request runs 3.15 (the newest); a native push, nightly and dispatch run 3.12 and 3.15; a release runs 3.11 to 3.15. The pyver gate of a release is the free-threaded 3.14t only. The release verify list follows. uv 0.12.0 installs CPython 3.15.0b4 for "--python 3.15"; uv 0.13.0 is the first that knows 3.15.0, so every uv pin moves to 0.13.10. The examples stay on 3.11 to 3.14 (JVM) and 3.12 and 3.14 (native): inflate64, pybcj and pyppmd, compiled dependencies of py7zr, publish no cp315 wheel. The free-threaded GIL report no longer imports jpype: since 1.8.0 importing it turns the GIL back on, and the native wheel does not depend on it. --- .github/workflows/engine-watch.yml | 2 +- .github/workflows/pre-commit.yml | 2 +- .github/workflows/release-native.yml | 16 +++--- .github/workflows/test-jvm.yml | 12 ++--- .github/workflows/test-native.yml | 43 ++++++++------- .github/workflows/test-python-examples.yml | 4 +- CONTRIBUTING.md | 4 +- README.md | 2 +- docs/modules/ROOT/pages/development/ci.adoc | 29 +++++----- .../development/release-native-smoke.adoc | 2 +- .../ROOT/pages/development/release.adoc | 6 +-- .../ROOT/pages/how-to/concurrency.adoc | 2 +- docs/modules/ROOT/pages/index.adoc | 2 +- docs/modules/ROOT/pages/installation.adoc | 2 +- docs/modules/ROOT/pages/which-package.adoc | 4 +- examples/07_stackoverflow_tables_oltp.py | 2 +- examples/08_stackoverflow_tables_olap.py | 2 +- examples/09_stackoverflow_graph_oltp.py | 2 +- examples/10_stackoverflow_graph_olap.py | 2 +- examples/11_vector_index_build.py | 2 +- examples/12_vector_search.py | 2 +- native/wheel/README.md | 4 +- pyproject.toml | 16 +++--- scripts/Dockerfile.build | 10 ++-- scripts/build.sh | 2 +- scripts/select_matrix.py | 25 +++++---- scripts/select_native_matrix.py | 45 ++++++++++------ tests/test_dev_engine_pin.py | 10 ++-- tests/test_native_wheel_template.py | 6 +-- tests/test_release_native_verify.py | 4 +- tests/test_select_matrix.py | 54 ++++++++++++------- tests/test_select_native_matrix.py | 32 +++++------ 32 files changed, 193 insertions(+), 159 deletions(-) diff --git a/.github/workflows/engine-watch.yml b/.github/workflows/engine-watch.yml index 220cb725..da69b7e3 100644 --- a/.github/workflows/engine-watch.yml +++ b/.github/workflows/engine-watch.yml @@ -61,7 +61,7 @@ jobs: - name: Set up uv uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: - version: "0.12.0" + version: "0.13.10" enable-cache: false - name: Compare the engine with the mark diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index b1358f34..37b23ac8 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -39,7 +39,7 @@ jobs: # Retry transient network failures (a connection reset failed a whole examples job on #8897); the # script is downloaded first so a retried transfer is never piped half-written into sh. installer="$(mktemp)" - curl -LsSf --retry 5 --retry-all-errors --retry-delay 5 -o "$installer" https://astral.sh/uv/0.12.0/install.sh + curl -LsSf --retry 5 --retry-all-errors --retry-delay 5 -o "$installer" https://astral.sh/uv/0.13.10/install.sh sh "$installer" echo "$HOME/.local/bin" >> "$GITHUB_PATH" export PATH="$HOME/.local/bin:$PATH" diff --git a/.github/workflows/release-native.yml b/.github/workflows/release-native.yml index 25acd33e..d5f7d282 100644 --- a/.github/workflows/release-native.yml +++ b/.github/workflows/release-native.yml @@ -5,9 +5,9 @@ name: Release native (arcadedb) # starts release-jvm.yml, which publishes `arcadedb-jvm`; the two workflows do not wait for each other. # # The build and the tests are test-native.yml, called with `release: true` (the full matrix: linux-x86_64, linux-aarch64, -# macos-arm64 and windows-x64, each on Python 3.11 to 3.14, and the `pyver` job: the linux-x86_64 wheel on Python 3.15 and on the -# free-threaded 3.14t). A native image build takes about 5 to 30 minutes per platform; this workflow adds -# no build of its own. The way the JVM release calls test-jvm.yml is the model. +# macos-arm64 and windows-x64, each on Python 3.11 to 3.15, and the `pyver` job: the linux-x86_64 wheel on the free-threaded +# 3.14t). A native image build takes about 5 to 30 minutes per platform; this workflow adds no build of its own. The way the JVM +# release calls test-jvm.yml is the model. # # PyPI keys a trusted publisher on this FILENAME and on the job's environment, so do not rename either without changing the publisher # on PyPI at the same time: @@ -16,13 +16,13 @@ name: Release native (arcadedb) # The GitHub environment `pypi` only accepts deployments from tags that match [0-9]*. There is one environment and one publish job for # dev, final and post releases. # -# What is published (the `verify` job decides, the `publish` job uploads). Every kind of release also needs the two `pyver` legs to have -# passed (3.15 and 3.14t on the linux-x86_64 wheel; the other platforms are not tested on them): +# What is published (the `verify` job decides, the `publish` job uploads). Every kind of release also needs the `pyver` leg to have +# passed (free-threaded 3.14t on the linux-x86_64 wheel; the other platforms are not tested on it): # A.B.C.devN the parity run of linux-x86_64, linux-aarch64 and macos-arm64 passed on every Python. windows-x64 is published too when it # passed on every Python, and is informational otherwise. # A.B.C, A.B.C.postN ONLY when the readiness bar is met: the repository variable ARCADEDB_NATIVE_READINESS_BAR_MET is `true` (a maintainer # sets it after checking the correctness fixes and the fault and concurrency probes), the parity run of ALL four platforms -# on ALL four Pythons passed, and no test is a NOTYET skip (test-native.yml passes --max-notyet 0 for a final version). +# on ALL five Pythons passed, and no test is a NOTYET skip (test-native.yml passes --max-notyet 0 for a final version). # Speed parity is not part of the bar. The bar is written down in docs/modules/ROOT/pages/development/release.adoc. # # Nothing here stores a token: the publish job authenticates with PyPI trusted publishing (OIDC), and only that job has the id-token @@ -147,9 +147,9 @@ jobs: set -euo pipefail mkdir -p passed dist ls -l passed wheels - pythons="3.11 3.12 3.13 3.14" + pythons="3.11 3.12 3.13 3.14 3.15" # the `pyver` legs of a release (scripts/select_native_matrix.py; tests/test_select_native_matrix.py checks that this list is the same) - pyver_pythons="3.15 3.14t" + pyver_pythons="3.14t" if [ "$FINAL" = true ]; then required="linux-x86_64 linux-aarch64 macos-arm64 windows-x64" if [ "$BAR" != true ]; then diff --git a/.github/workflows/test-jvm.yml b/.github/workflows/test-jvm.yml index 15543d4f..7667ffd4 100644 --- a/.github/workflows/test-jvm.yml +++ b/.github/workflows/test-jvm.yml @@ -1,6 +1,6 @@ # The JVM build: the `arcadedb-jvm` distribution. release-jvm.yml calls this workflow on a version tag and publishes the wheels it builds. # One wheel per platform, py3-none- (setup.py): the `build` job builds each once, and the `test` job installs that one file -# into every Python (3.11 to 3.14) and runs the suite. The jars and the bundled JRE do not depend on the Python, so nothing is built per Python. +# into every Python (3.11 to 3.15) and runs the suite. The jars and the bundled JRE do not depend on the Python, so nothing is built per Python. # The native build, `arcadedb`, is test-native.yml / release-native.yml. name: Test JVM (arcadedb-jvm) @@ -133,7 +133,7 @@ jobs: # Retry transient network failures (a connection reset failed a whole examples job on #8897); the # script is downloaded first so a retried transfer is never piped half-written into sh. installer="$(mktemp)" - curl -LsSf --retry 5 --retry-all-errors --retry-delay 5 -o "$installer" https://astral.sh/uv/0.12.0/install.sh + curl -LsSf --retry 5 --retry-all-errors --retry-delay 5 -o "$installer" https://astral.sh/uv/0.13.10/install.sh sh "$installer" echo "$HOME/.local/bin" >> "$GITHUB_PATH" export PATH="$HOME/.local/bin:$PATH" @@ -169,7 +169,7 @@ jobs: # Retry transient network failures (a connection reset failed a whole examples job on #8897); the # script is downloaded first so a retried transfer is never piped half-written into sh. installer="$(mktemp)" - curl -LsSf --retry 5 --retry-all-errors --retry-delay 5 -o "$installer" https://astral.sh/uv/0.12.0/install.sh + curl -LsSf --retry 5 --retry-all-errors --retry-delay 5 -o "$installer" https://astral.sh/uv/0.13.10/install.sh sh "$installer" echo "$HOME/.local/bin" >> "$GITHUB_PATH" export PATH="$HOME/.local/bin:$PATH" @@ -374,7 +374,7 @@ jobs: # Retry transient network failures (a connection reset failed a whole examples job on #8897); the # script is downloaded first so a retried transfer is never piped half-written into sh. installer="$(mktemp)" - curl -LsSf --retry 5 --retry-all-errors --retry-delay 5 -o "$installer" https://astral.sh/uv/0.12.0/install.sh + curl -LsSf --retry 5 --retry-all-errors --retry-delay 5 -o "$installer" https://astral.sh/uv/0.13.10/install.sh sh "$installer" echo "$HOME/.local/bin" >> "$GITHUB_PATH" export PATH="$HOME/.local/bin:$PATH" @@ -483,7 +483,7 @@ jobs: # Retry transient network failures (a connection reset failed a whole examples job on #8897); the # script is downloaded first so a retried transfer is never piped half-written into sh. installer="$(mktemp)" - curl -LsSf --retry 5 --retry-all-errors --retry-delay 5 -o "$installer" https://astral.sh/uv/0.12.0/install.sh + curl -LsSf --retry 5 --retry-all-errors --retry-delay 5 -o "$installer" https://astral.sh/uv/0.13.10/install.sh sh "$installer" echo "$HOME/.local/bin" >> "$GITHUB_PATH" export PATH="$HOME/.local/bin:$PATH" @@ -805,7 +805,7 @@ jobs: 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 echo "" >> $GITHUB_STEP_SUMMARY echo "ℹ️ **Note**: Some platform/Python combinations are excluded from testing on every event:" >> $GITHUB_STEP_SUMMARY - echo "- Windows ARM64 (GitHub-hosted windows-11-arm runners exist, but jpype1 1.7.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 + 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 echo "- macOS x86_64 (temporarily disabled)" >> $GITHUB_STEP_SUMMARY else echo "❌ **Some legs failed testing**" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/test-native.yml b/.github/workflows/test-native.yml index ae6e496b..a0b43c0e 100644 --- a/.github/workflows/test-native.yml +++ b/.github/workflows/test-native.yml @@ -4,13 +4,13 @@ # # A native image build takes about 5 to 30 minutes per platform and the ArcadeData organisation shares a runner cap with # upstream ArcadeDB, so the load is selective (scripts/select_native_matrix.py holds the legs, tests/test_select_native_matrix.py pins them): -# pull request only when a native path changed (the `paths` filter below); linux-x86_64 and the newest Python (3.14), the parity +# pull request only when a native path changed (the `paths` filter below); linux-x86_64 and the newest Python (3.15), the parity # suite in shards, no `pyver` and no example leg (the fast tier: its checks finish in about 10 minutes, #517); not # for a draft. With the label ci:full, or opened by Dependabot: the legs of a push to main (scripts/ci_tier.py decides) -# push to main only when a native path changed; all four platforms, Python 3.12 and 3.14 -# nightly all four platforms, Python 3.12 and 3.14, but only when something besides docs changed in the last 25 hours (a full run on Mondays) -# dispatch all four platforms, Python 3.12 and 3.14 -# workflow_call from release-native.yml with `release: true`: all four platforms, Python 3.11 to 3.14 +# push to main only when a native path changed; all four platforms, Python 3.12 and 3.15 +# nightly all four platforms, Python 3.12 and 3.15, but only when something besides docs changed in the last 25 hours (a full run on Mondays) +# dispatch all four platforms, Python 3.12 and 3.15 +# workflow_call from release-native.yml with `release: true`: all four platforms, Python 3.11 to 3.15 # weekly from test-native-snapshot.yml with `engine-snapshot: true`: the legs of a pull request against upstream's engine snapshot # # The native library (the image build, about 11 minutes) is cached for linux-x86_64 under a key of everything it is built from: the @@ -19,9 +19,10 @@ # This workflow never publishes: it has no id-token permission and no environment. # # Beside the full parity runs, the `pyver` job installs the already built linux-x86_64 wheel (py3-none: no rebuild) into the Pythons the full -# runs of the event leave out (main, nightly, dispatch: 3.11, 3.13; a release: none; a pull request runs no leg of this job), into 3.15 (the full suite -# needs jpype1 and ladybug, which have no cp315 wheel yet, so 3.15 runs without the test files that need jpype1) and into the free-threaded 3.14t, and runs a small subset of the tests there (about 20 s of tests per Python). A release needs it: a leg that passes uploads a marker (native-passed-pyver-py), and release-native.yml -# publishes nothing unless the legs of a release (3.15 and the free-threaded 3.14t) passed. Only linux-x86_64 is checked on them. +# runs of the event leave out (main, nightly, dispatch: 3.11, 3.13, 3.14; a release: none; a pull request runs no leg of this job) and into the +# free-threaded 3.14t, and runs a small subset of the tests there (about 20 s of tests per Python). A release needs it: a leg that passes uploads a +# marker (native-passed-pyver-py), and release-native.yml publishes nothing unless the leg of a release (the free-threaded 3.14t) passed. +# Only linux-x86_64 is checked on it. # scripts/select_native_matrix.py decides its legs. # # The `examples` job runs every script of examples/ against the installed wheel of each platform (Python 3.12 and 3.14; a pull request of the fast tier: none), through @@ -98,7 +99,7 @@ on: default: "" type: string release: - description: "The release legs: all four platforms and Python 3.11 to 3.14 (otherwise the small main/nightly legs)" + description: "The release legs: all four platforms and Python 3.11 to 3.15 (otherwise the small main/nightly legs)" required: false default: false type: boolean @@ -120,7 +121,7 @@ on: default: "" type: string legs: - description: "full = all four platforms, Python 3.12 and 3.14; pull-request = linux-x86_64 and Python 3.14 only, in shards (what a pull request runs)" + description: "full = all four platforms, Python 3.12 and 3.15; pull-request = linux-x86_64 and Python 3.15 only, in shards (what a pull request runs)" required: false default: "full" type: choice @@ -149,7 +150,7 @@ permissions: env: GRAALVM_VERSION: "25.4.4.1.1" GRAALVM_BASE: https://github.com/graalvm/graalvm-ce-builds/releases/download/graal-25.4.4.1.1 - UV_VERSION: "0.12.0" + UV_VERSION: "0.13.10" PYTHONUTF8: "1" # Windows defaults to cp1252; the notices contain non-ASCII author names # The version and engine of a run that does not pass them (pull request, push, nightly). The newest engine release on Maven Central is what an A.B.C.devN wheel links # (the A.B.C release does not exist yet); raise it when a newer release is out. @@ -1067,11 +1068,12 @@ jobs: # the test files, not the whole suite. The legs are the supported Pythons the full parity runs of this event leave out, plus the # free-threaded 3.14t (scripts/select_native_matrix.py). # Part of the release gate (ArcadeData/arcadedb-python#349): a leg that passes uploads the marker native-passed-pyver-py (the file name of - # the wheel it installed), and `verify` in release-native.yml requires the markers of the legs a release has (3.15 and 3.14t, see - # scripts/select_native_matrix.py), so a red leg stops the release. Only the linux-x86_64 wheel is checked on these Pythons. + # the wheel it installed), and `verify` in release-native.yml requires the marker of the leg a release has (3.14t, see + # scripts/select_native_matrix.py), so a red leg stops the release. Only the linux-x86_64 wheel is checked on it. # 3.14t runs without polars, and so without test_dataframe_ingest.py (it imports polars at module level): polars ships abi3 wheels only # (polars and polars-runtime-32 have no cp314t wheel, and an abi3 wheel cannot be installed on a free-threaded build). The other # dependencies of the subset (numpy, pandas, pyarrow, jpype1, requests) all have cp314t wheels. polars is an optional extra of the wheel. + # JPype 1.8.0 and later turn the GIL back on when they are imported, so a test file that imports jpype runs with the GIL on 3.14t. pyver: name: Python ${{ matrix.python }} on the wheel (linux-x86_64) needs: [plan, build] @@ -1131,8 +1133,9 @@ jobs: files="$files,test_dataframe_ingest.py" with_polars=(--with polars) fi - # No jpype1 wheel for this Python (3.15): leave out test_parameter_binding.py (it imports jpype at module level) and test_vector.py - # (four tests build Java arrays with it). Everything else of the subset needs no JVM bridge. + # A Python without a jpype1 wheel (NO_JPYPE_PYTHONS in scripts/select_native_matrix.py, none today): leave out + # test_parameter_binding.py (it imports jpype at module level) and test_vector.py (four tests build Java arrays with it). + # Everything else of the subset needs no JVM bridge. with_jpype=(--with jpype1) if [ "$WITH_JPYPE" != true ]; then files="$(printf '%s' "$files" | tr ',' '\n' | grep -v -x -F -e test_parameter_binding.py -e test_vector.py | paste -sd, -)" @@ -1145,14 +1148,13 @@ jobs: python native/wheel/parity_wheel.py --repo "$GITHUB_WORKSPACE" --files "$files" \ --out "$T/parity/parity-wheel.tsv" --cores "0-$((cores - 1))" | tee "$T/parity/parity-wheel.run.log" - # A free-threaded leg only means something if the GIL stays off once the wheel and the extension modules are loaded. + # A free-threaded leg only means something if the GIL stays off once the wheel and the extension modules are loaded. JPype is left out: + # the wheel does not depend on it, and since 1.8.0 importing it turns the GIL back on. - name: Report whether the GIL is enabled run: | set -euo pipefail w="$(ls "$T"/wheel/*.whl)" - with_jpype=(--with jpype1) - if [ "$WITH_JPYPE" != true ]; then with_jpype=(); fi - uv run --no-project --python "$PY" --with "$w" --with numpy --with pandas --with pyarrow ${with_jpype[@]+"${with_jpype[@]}"} python - <<'PY' | tee -a "$GITHUB_STEP_SUMMARY" + uv run --no-project --python "$PY" --with "$w" --with numpy --with pandas --with pyarrow python - <<'PY' | tee -a "$GITHUB_STEP_SUMMARY" import os import sys @@ -1161,9 +1163,6 @@ jobs: import pandas # noqa: F401 import pyarrow # noqa: F401 - if os.environ["WITH_JPYPE"] == "true": - import jpype # noqa: F401 - gil = sys._is_gil_enabled() if hasattr(sys, "_is_gil_enabled") else True print(f"python {sys.version.split()[0]}, GIL enabled after loading the wheel and its dependencies: {gil}") if os.environ["FREE_THREADED"] == "true" and gil: diff --git a/.github/workflows/test-python-examples.yml b/.github/workflows/test-python-examples.yml index 803d4f6a..1396760d 100644 --- a/.github/workflows/test-python-examples.yml +++ b/.github/workflows/test-python-examples.yml @@ -274,7 +274,7 @@ jobs: # Retry transient network failures (a connection reset failed a whole examples job on #8897); the # script is downloaded first so a retried transfer is never piped half-written into sh. installer="$(mktemp)" - curl -LsSf --retry 5 --retry-all-errors --retry-delay 5 -o "$installer" https://astral.sh/uv/0.12.0/install.sh + curl -LsSf --retry 5 --retry-all-errors --retry-delay 5 -o "$installer" https://astral.sh/uv/0.13.10/install.sh sh "$installer" echo "$HOME/.local/bin" >> "$GITHUB_PATH" export PATH="$HOME/.local/bin:$PATH" @@ -371,7 +371,7 @@ jobs: # Retry transient network failures (a connection reset failed a whole examples job on #8897); the # script is downloaded first so a retried transfer is never piped half-written into sh. installer="$(mktemp)" - curl -LsSf --retry 5 --retry-all-errors --retry-delay 5 -o "$installer" https://astral.sh/uv/0.12.0/install.sh + curl -LsSf --retry 5 --retry-all-errors --retry-delay 5 -o "$installer" https://astral.sh/uv/0.13.10/install.sh sh "$installer" echo "$HOME/.local/bin" >> "$GITHUB_PATH" export PATH="$HOME/.local/bin:$PATH" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a7393ffb..b192dfaf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,7 +38,7 @@ Add a dependency (a Python extra, or anything bundled in a wheel) only when it i ### Prepare your environment -You need [uv](https://docs.astral.sh/uv/), Git, and Python 3.11 to 3.14. This repository is a package definition, not a uv project (`pyproject.toml` sets `managed = false`), so there is no environment to sync. You build a wheel (or, for a change to Python files only, [borrow one](#change-python-code-without-building-a-wheel)), and `uv run --no-project --with ` makes a throwaway environment from it. Nothing is installed into your system Python. +You need [uv](https://docs.astral.sh/uv/), Git, and Python 3.11 to 3.15. This repository is a package definition, not a uv project (`pyproject.toml` sets `managed = false`), so there is no environment to sync. You build a wheel (or, for a change to Python files only, [borrow one](#change-python-code-without-building-a-wheel)), and `uv run --no-project --with ` makes a throwaway environment from it. Nothing is installed into your system Python. ```shell git clone git@github.com:ArcadeData/arcadedb-python.git @@ -146,7 +146,7 @@ shellcheck and hadolint run as `docker_image` hooks (Docker pulls the images aut CI has two tiers, so that a pull request does not wait for the macOS and Windows runners that the organisation shares with ArcadeData/arcadedb. -- **A pull request runs the fast tier**, which is meant to finish in about 10 minutes. The static checks (pre-commit, Bandit, the dependency audits) run as before. The builds and tests run on one platform and one Python, Linux x86-64 and Python 3.14: the `arcadedb-jvm` wheel with its tests in two shards and, when a native path changed, the native wheel with the parity suite in five shards. The native library is taken from a cache unless the pull request changes what it is built from. The examples and the other Python versions do not run. A pull request that changes only documentation runs no platform job. +- **A pull request runs the fast tier**, which is meant to finish in about 10 minutes. The static checks (pre-commit, Bandit, the dependency audits) run as before. The builds and tests run on one platform and one Python, Linux x86-64 and Python 3.15: the `arcadedb-jvm` wheel with its tests in two shards and, when a native path changed, the native wheel with the parity suite in five shards. The native library is taken from a cache unless the pull request changes what it is built from. The examples and the other Python versions do not run. A pull request that changes only documentation runs no platform job. - **`main` runs the full tier.** A push to `main` and the nightly run (03:00 to 04:00 UTC) test all four platforms (Linux x86-64, Linux arm64, macOS arm64 and Windows x86-64), more Python versions, and run the examples on each platform. A release tests every platform on every Python version. - **To run the full tier on a pull request**, add the label `ci:full`, then push a commit or choose "Re-run all jobs" on its test workflows. The pull request then runs what a push to `main` runs. Use it for a change that can behave differently on another platform or Python: file paths, processes and signals, the wheel build, the native library, the examples, a workflow file. If you cannot add labels, ask for it in the pull request. Dependabot pull requests always run the full tier. diff --git a/README.md b/README.md index e9c5f03d..90ef0f61 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ uv add arcadedb-jvm # JVM, for heavy long-running loads > 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`. -- Python: `arcadedb` (native) is tested on 3.11 to 3.14 and also installs on 3.15 (`requires-python` is `>=3.11` with no upper bound; the CI runs a subset of the tests on 3.15). `arcadedb-jvm` needs 3.11 to 3.14 (`requires-python` is `>=3.11,<3.15`; its dependency JPype has no 3.15 wheel yet). 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.14 on all four platforms below. Between releases, `main` and the nightly run test `arcadedb` on 3.12 and 3.14 on every platform (with a short subset on 3.11, 3.13 and 3.15), and `arcadedb-jvm` on 3.11 to 3.14 on Linux x86-64 and on 3.11 and 3.14 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)). +- 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. - Linux x86_64 and ARM64, macOS on Apple Silicon, Windows x86_64, for both packages. The Windows wheel of `arcadedb` is the newest. - Import name: `arcadedb`. Check which package you have with `python -c "import arcadedb; print(arcadedb.__backend__)"`. It prints `native` or `jvm`. - Optional extras: `arrow`, `pandas`, `polars`, `vector` for `arcadedb-jvm`; `numpy`, `arrow`, `pandas`, `polars` for `arcadedb`. diff --git a/docs/modules/ROOT/pages/development/ci.adoc b/docs/modules/ROOT/pages/development/ci.adoc index 7e54d949..53f258d5 100644 --- a/docs/modules/ROOT/pages/development/ci.adoc +++ b/docs/modules/ROOT/pages/development/ci.adoc @@ -20,14 +20,14 @@ The release workflows call the test workflows (`workflow_call`) and then publish The workflow `docs.yml` builds these docs (the Antora component in `docs/`) as a site of its own with `docs/antora-playbook.yml`, on every pull request and push to `main` that changes `docs/`, and attaches the site as the `docs-site` artifact. Download it from the run to read a page as it will render. The test workflows ignore `+docs/**+` and `+*.adoc+`, so for a docs-only pull request this job is the only check. A warning fails it: a broken `xref:`, a misspelled `+{attribute}+`, an AsciiDoc syntax problem. Pages link into the main ArcadeDB manual as `+{arcadedb-docs-url}/+`, not with an `arcadedb::` xref, which the component on its own cannot resolve. To build the site locally, run `npx -p @antora/cli@3.2.1 -p @antora/site-generator@3.2.1 antora docs/antora-playbook.yml` from the repository root and open `docs/build/site/index.html`. -The package supports four platforms and four Python versions (3.11 to 3.14). That is 16 combinations. The organisation shares one runner limit with ArcadeData/arcadedb, so each macOS or Windows job delays the upstream jobs too, and not every combination runs. +The package supports four platforms and five Python versions (3.11 to 3.15). That is 20 combinations. The organisation shares one runner limit with ArcadeData/arcadedb, so each macOS or Windows job delays the upstream jobs too, and not every combination runs. == Fast tier and full tier The CI has two tiers. -* The fast tier runs on every pull request: the static checks, and the builds and tests of both packages on one platform and one Python, Linux x86-64 with the newest Python the full suites run on (3.14). It waits for no macOS, Windows or arm64 runner, and it runs no example job, also when the pull request changes the examples: they are the slowest jobs (they build the vectors of a dataset and run 30 scripts), so they run in the full tier. -* The full tier runs on a push to `main`, on the nightly run, on a manual run and on a release. It tests all four platforms. A release tests every platform on every Python version. +* The fast tier runs on every pull request: the static checks, and the builds and tests of both packages on one platform and one Python, Linux x86-64 with the newest Python the full suites run on (3.15). It waits for no macOS, Windows or arm64 runner, and it runs no example job, also when the pull request changes the examples: they are the slowest jobs (they build the vectors of a dataset and run 30 scripts), so they run in the full tier. +* The full tier runs on a push to `main`, on the nightly run, on a manual run and on a release. It tests all four platforms. A release tests every platform on every Python version (the examples of `{jvm-pkg-name}` and of `{native-pkg-name}` do not run on 3.15 yet, see <>). A pull request runs the legs of a push to `main` when it carries the label `ci:full`. Add the label, then push a commit or choose "Re-run all jobs" on the test workflows of the pull request: `scripts/ci_tier.py` reads the labels again at the start of each run, so no new commit is needed. Use the label for a change that can behave differently on another platform or Python: file paths, processes and signals, the wheel build, the native library, the examples or their runner, a workflow file. To go back to the fast tier, remove the label and push a commit. A pull request that Dependabot opened always runs the full tier, because the hourly job merges it without a reader; nobody waits for it. When the labels cannot be read, the pull request runs the full tier. @@ -65,8 +65,9 @@ The wheel of `arcadedb-jvm` is tagged `py3-none-` (`setup.py`), like t * `Build arcadedb-jvm wheel ()` builds the wheel once for each platform and uploads it as `wheel-`. `scripts/verify_wheel_tag.py` fails the build when the wheel is not `py3-none-`. * `Test arcadedb (, Python )` downloads that wheel and runs the tests on one Python in a throwaway `uv run --no-project --with "[test]" python -m pytest` environment. It builds nothing. The release publishes these same four files. -The `requires-python` of the package is `>=3.11,<3.15`. The wheel tag no longer keeps an installer off Python 3.15, so the cap does it. JPype has no 3.15 wheel yet; remove the cap, and add 3.15 to the matrix, when it has one. +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. +[[what-runs]] == What runs when The script `scripts/select_matrix.py` chooses the combinations. The first job of each workflow, `Download ArcadeDB JARs`, runs it and passes the result to the next jobs: the test legs and the platforms to build (`--wheels`). @@ -76,19 +77,21 @@ The script `scripts/select_matrix.py` chooses the combinations. The first job of | Event | Unit tests (`Test arcadedb`) | Examples (`Test Python Examples`) | Pull request (the fast tier) -| 1 leg in 2 shards: `linux/amd64` on Python 3.14. +| 1 leg in 2 shards: `linux/amd64` on Python 3.15. | None. | Push to `main`, the nightly run, a pull request with the label `ci:full`, a Dependabot pull request -| 10 legs: `linux/amd64` on all four Python versions. `linux/arm64`, `darwin/arm64` and `windows/amd64` on Python 3.11 and 3.14. -| All 16 combinations. +| 11 legs: `linux/amd64` on all five Python versions. `linux/arm64`, `darwin/arm64` and `windows/amd64` on Python 3.11 and 3.15. +| 16 legs: the four platforms on Python 3.11 to 3.14. | A manual run (dispatch), a release -| All 16 combinations. -| All 16 combinations. +| All 20 combinations. +| 16 legs: the four platforms on Python 3.11 to 3.14. |=== -The unit tests run one leg in two shards on a pull request (the newest Python on `linux/amd64`), 10 legs on a push to `main` and the nightly run (all Python versions on one Linux platform, the oldest and the newest elsewhere), and all 16 combinations on a release and a manual run, like the native package: what is published is tested on every platform and Python it claims. `release-jvm.yml` calls the workflow with `release: true`, which the matrix step turns into the event `release`, because in a called workflow `github.event_name` is the caller's tag push. A pull request runs 7 jobs in these two workflows: 2 test jobs, 1 wheel build, the two `Download ArcadeDB JARs` jobs (the one of `test-python-examples.yml` only chooses the legs, and downloads nothing when there is none), `Bandit security scan` and `Dependency floor audit`. The build and the example job of `test-python-examples.yml` and the two summary jobs show as skipped. A push, the nightly run and a pull request that asks for the full tier run 40: 26 test jobs (10 and 16), 8 wheel builds (4 for each workflow), the same four other jobs and the two summary jobs. A manual run and a release run 46, with the 6 extra unit-test legs. +No example runs on Python 3.15 yet, for either package. The examples unpack their datasets with `py7zr`, and three compiled dependencies of it (`inflate64`, `pybcj` and `pyppmd`) publish no 3.15 wheel, so a 3.15 leg would compile them. `EXAMPLES_PYTHONS` in `scripts/select_matrix.py` and in `scripts/select_native_matrix.py` gets 3.15 when they do. + +The unit tests run one leg in two shards on a pull request (the newest Python on `linux/amd64`), 11 legs on a push to `main` and the nightly run (all Python versions on one Linux platform, the oldest and the newest elsewhere), and all 20 combinations on a release and a manual run, like the native package: what is published is tested on every platform and Python it claims. `release-jvm.yml` calls the workflow with `release: true`, which the matrix step turns into the event `release`, because in a called workflow `github.event_name` is the caller's tag push. A pull request runs 7 jobs in these two workflows: 2 test jobs, 1 wheel build, the two `Download ArcadeDB JARs` jobs (the one of `test-python-examples.yml` only chooses the legs, and downloads nothing when there is none), `Bandit security scan` and `Dependency floor audit`. The build and the example job of `test-python-examples.yml` and the two summary jobs show as skipped. A push, the nightly run and a pull request that asks for the full tier run 41: 27 test jobs (11 and 16), 8 wheel builds (4 for each workflow), the same four other jobs and the two summary jobs. A manual run and a release run 50, with the 9 extra unit-test legs. The names of the test jobs are `Test arcadedb (, Python )`, with `, shard I/N` after the Python on a sharded leg. A check of the full tier keeps its history. No check is required by a branch rule today. If one becomes required, choose a job that runs on every pull request: a required check that only the full tier starts would never report on a pull request, and a skipped summary job counts as passed. @@ -163,9 +166,9 @@ At each upstream release, a person or a session reads the two lists of commits a The workflow `test-native.yml` builds the native image of the `arcadedb` package and runs the test suite against the installed wheel. It does not follow the table above. It never publishes; `release-native.yml` calls it on a version tag. -* A pull request runs it only when native paths change: `+native/**+`, `+src/arcadedb/**+`, `+tests/**+`, `+examples/**+` (not `examples/README.md`), `pyproject.toml`, `setup.py`, `scripts/select_native_matrix.py`, `scripts/ci_tier.py`, `scripts/shard_tests.py`, `scripts/smoke_wheel.py`, `scripts/run_examples.sh`, `scripts/native_examples_skip.txt` or `test-native.yml` itself. Changes under `tests/` and `src/arcadedb/` are included because both backends share those files, so a shared test or source can break native parity without touching a native file; docs outside those paths do not run it. It then runs on `linux-x86_64` only (the fast tier): the library (restored from the <> or built), the wheel, and the parity suite on Python 3.14 in five shards. It runs no `pyver` and no example leg. With the label `ci:full`, and for a Dependabot pull request, it runs the legs of a push to `main`. -* A push to `main` (only when a native path changed, same filter as a pull request), the nightly run (skipped when nothing changed in the last 25 hours, except on Mondays) and a manual run (dispatch) run all four platforms: `linux-x86_64`, `linux-aarch64`, `macos-arm64` and `windows-x64` (Python 3.12 and 3.14). A release (`release-native.yml` calls the workflow with `release: true`) runs the same four platforms on all four Python versions, 16 legs. -* The `pyver` job installs the already built `linux-x86_64` wheel (no rebuild) into the Pythons that the full parity runs of the event leave out (3.11 and 3.13 on a push to `main`, the nightly run and a dispatch; none on a release) into 3.15 and into the free-threaded 3.14t, and runs 13 test files there (14 where polars installs; 3.15 has no jpype1 wheel, so it leaves out the two files that need jpype1), about 20 seconds of tests per Python. A release needs it: a `pyver` leg that passes uploads the marker `native-passed-pyver-py` (it holds the file name of the wheel the leg installed), and `Verify what may be published` in `release-native.yml` requires the markers of 3.15 and 3.14t, the two legs of a release, and that both tested the `linux-x86_64` wheel that is published. A red leg stops a release before anything reaches PyPI. A pull request of the fast tier runs no leg of this job: every Python but 3.14 runs in the full tier. In the 30 days before issue 442 no `pyver` leg was red on a commit where the parity suite on Linux x86-64 was green. Only `linux-x86_64` is checked on these two Pythons: the other platforms are not tested on 3.15 and 3.14t, and the JVM package has no such job. The 3.14t leg has no polars (no free-threaded wheel exists), so it skips `test_dataframe_ingest.py`. `scripts/select_native_matrix.py` decides its legs, and `tests/test_select_native_matrix.py` and `tests/test_release_native_verify.py` pin the gate. +* A pull request runs it only when native paths change: `+native/**+`, `+src/arcadedb/**+`, `+tests/**+`, `+examples/**+` (not `examples/README.md`), `pyproject.toml`, `setup.py`, `scripts/select_native_matrix.py`, `scripts/ci_tier.py`, `scripts/shard_tests.py`, `scripts/smoke_wheel.py`, `scripts/run_examples.sh`, `scripts/native_examples_skip.txt` or `test-native.yml` itself. Changes under `tests/` and `src/arcadedb/` are included because both backends share those files, so a shared test or source can break native parity without touching a native file; docs outside those paths do not run it. It then runs on `linux-x86_64` only (the fast tier): the library (restored from the <> or built), the wheel, and the parity suite on Python 3.15 in five shards. It runs no `pyver` and no example leg. With the label `ci:full`, and for a Dependabot pull request, it runs the legs of a push to `main`. +* A push to `main` (only when a native path changed, same filter as a pull request), the nightly run (skipped when nothing changed in the last 25 hours, except on Mondays) and a manual run (dispatch) run all four platforms: `linux-x86_64`, `linux-aarch64`, `macos-arm64` and `windows-x64` (Python 3.12 and 3.15). A release (`release-native.yml` calls the workflow with `release: true`) runs the same four platforms on all five Python versions, 20 legs. +* The `pyver` job installs the already built `linux-x86_64` wheel (no rebuild) into the Pythons that the full parity runs of the event leave out (3.11, 3.13 and 3.14 on a push to `main`, the nightly run and a dispatch; none on a release) and into the free-threaded 3.14t, and runs 13 test files there (14 where polars installs), about 20 seconds of tests per Python. A release needs it: a `pyver` leg that passes uploads the marker `native-passed-pyver-py` (it holds the file name of the wheel the leg installed), and `Verify what may be published` in `release-native.yml` requires the marker of 3.14t, the one leg of a release, and that it tested the `linux-x86_64` wheel that is published. A red leg stops a release before anything reaches PyPI. A pull request of the fast tier runs no leg of this job: every Python but 3.15 runs in the full tier. In the 30 days before issue 442 no `pyver` leg was red on a commit where the parity suite on Linux x86-64 was green. Only `linux-x86_64` is checked on 3.14t: the other platforms are not tested on it, and the JVM package has no such job. The 3.14t leg has no polars (no free-threaded wheel exists), so it skips `test_dataframe_ingest.py`. JPype 1.8.0 and later turn the GIL back on when imported, so a test file that imports `jpype` runs with the GIL there. `scripts/select_native_matrix.py` decides its legs, and `tests/test_select_native_matrix.py` and `tests/test_release_native_verify.py` pin the gate. * Every test file runs in its own process (`native/wheel/parity_wheel.py`). A process that dies without writing its result is a `CRASH` row in `parity-wheel.tsv` with its exit code, for example `CRASH(rc=0xC0000005,3221225477)`, and it fails the leg. On the Windows legs only (the crashes of issue 295 happen there), the harness runs such a file once more in a fresh process (`--retry-crash`). A retry that produces a result is a `FLAKY-CRASH` row: the gate lets the leg pass, the job summary lists the file with the first exit code, and on a release or a dispatch the `crash-report` job adds one comment to issue 295 (run URL, Python, wheel version, exit codes). A second crash, a failing test, a timeout and every crash on Linux or macOS stay failures. A process that wrote its result and then died in shutdown is a `DIRTY-EXIT` record (exit code, file, attempt) in the metadata, the job summary and the issue comment: it is not retried and does not fail the leg. Each Windows test process also writes a faulthandler trace, `parity-wheel-xml/.attemptN.fault.txt`, into the parity artifact of the leg. Only a retry hides a crash, so treat a `FLAKY-CRASH` as an open bug: read the trace in the artifact before a release is announced. * The four tests of `tests/test_vector_read_your_writes.py` run again when they hit a known engine race, on both packages (issue 409). The engine of 26.11.1 can miss a vector that a commit has just returned: a graph rebuild trims it between the two phases of its commit. The fix is pull request 12087 of ArcadeData/arcadedb, which is in no release yet, and the test must keep detecting the race, so it is not skipped. The rerun is in the tests (`run_with_known_race_rerun` in `tests/conftest.py`), not in a workflow, so every job that runs the file has it: the parity harness and the plain runs of the JVM build. A test body runs again on a fresh database, at most twice, and only when it failed with one of the three messages of the race (`committed vectors were not found`, `Vector search failed`, `+Record # not found+`). Any other failure, and a test that fails all three runs, fails the job. Each rerun is a `UserWarning` that names issue 409 in the warnings summary of the log. A test that passed only after a rerun carries the junit property `flaky_race`: the `TOTAL` row of `parity-wheel.tsv` counts it as `flaky_race=N`, the gate step prints a `FLAKY-RACE` line, and the `crash-report` job lists the tests in the job summary. A count never fails a leg. The rerun goes when the engine release that contains the fix is out and the file has passed 100 consecutive scheduled runs; then issue 409 is closed. * The `examples` job runs every script of `examples/` against the installed wheel of each platform (Python 3.12 and 3.14; a pull request of the fast tier: no leg) through `scripts/run_examples.sh`, the runner that `test-python-examples.yml` uses too. `scripts/native_examples_skip.txt` lists, with a reason, the examples that need the JVM package. `Examples summary` is the one check for all its legs. These legs do not decide what a release publishes. diff --git a/docs/modules/ROOT/pages/development/release-native-smoke.adoc b/docs/modules/ROOT/pages/development/release-native-smoke.adoc index 05ef6bdc..76c79993 100644 --- a/docs/modules/ROOT/pages/development/release-native-smoke.adoc +++ b/docs/modules/ROOT/pages/development/release-native-smoke.adoc @@ -151,7 +151,7 @@ A build that fails is a bad draw, not a bug to chase: the same commit, built aga . Stop at the first pass and approve the deployment. . When K builds have all failed, stop. The tool does not decide what happens next: that is the owner's call, with the JSON of every attempt in front of them. -Each attempt is a full release run of all four platforms on Python 3.11 to 3.14, on the runner limit that the organisation shares with upstream ArcadeDB. Do not start one without a reason. A control that reads outside 0.97 to 1.03 (exit status 3) is not a failed build: run the same wheels again. +Each attempt is a full release run of all four platforms on Python 3.11 to 3.15, on the runner limit that the organisation shares with upstream ArcadeDB. Do not start one without a reason. A control that reads outside 0.97 to 1.03 (exit status 3) is not a failed build: run the same wheels again. [[_release_notes]] == What goes into the release notes diff --git a/docs/modules/ROOT/pages/development/release.adoc b/docs/modules/ROOT/pages/development/release.adoc index 9b1ed3fa..672995d8 100644 --- a/docs/modules/ROOT/pages/development/release.adoc +++ b/docs/modules/ROOT/pages/development/release.adoc @@ -101,16 +101,16 @@ The version rule above holds for both packages. One tag starts both release work `release-native.yml` has four jobs: . `Validate tag` checks that the tag is a bare version and the next one (`scripts/check_version.py`). -. `test` calls `test-native.yml` with the full matrix: four platforms, each on Python 3.11 to 3.14. It builds the native image and the wheel on each platform and runs the test suite of this repository against the installed wheel. It also runs the `pyver` job: a subset of the tests against the `linux-x86_64` wheel on Python 3.15 and on the free-threaded 3.14t. +. `test` calls `test-native.yml` with the full matrix: four platforms, each on Python 3.11 to 3.15. It builds the native image and the wheel on each platform and runs the test suite of this repository against the installed wheel. It also runs the `pyver` job: a subset of the tests against the `linux-x86_64` wheel on the free-threaded 3.14t. . `Verify what may be published` reads which legs passed, applies the readiness gate below and collects the wheels. . `Publish to PyPI` uploads the wheels through the environment `pypi`. It refuses any wheel that is not the distribution `arcadedb`. `arcadedb` has one trusted publisher on PyPI (`release-native.yml` with the environment `pypi`) for dev, final and post releases, and one publish job in the workflow. `arcadedb-jvm` has one trusted publisher (`release-jvm.yml` with the environment `pypi-jvm`). PyPI matches the workflow file name, so renaming either file means changing the publisher on PyPI first. There is no separate pre-release environment; the readiness gate below is what keeps a final release back. * A native pre-release (`A.B.C.devN`) publishes when the builds on `linux-x86_64`, `linux-aarch64` and `macos-arm64` pass. -* Every native release, pre-release or final, also needs the two `pyver` legs (Python 3.15 and 3.14t on the `linux-x86_64` wheel) to pass. The other platforms are not tested on those two Pythons. +* Every native release, pre-release or final, also needs the `pyver` leg (free-threaded 3.14t on the `linux-x86_64` wheel) to pass. The other platforms are not tested on it. * A FINAL native release (`A.B.C` or `A.B.C.postN`) needs two more things: -** The repository variable `ARCADEDB_NATIVE_READINESS_BAR_MET` is `true`. A maintainer sets it after checking the readiness bar: the correctness fixes are merged; the full suite is green on every platform, Windows included, and on Python 3.11 to 3.14; the fault and concurrency probes pass; and the documented API raises no `NotOnNativeYet`. +** The repository variable `ARCADEDB_NATIVE_READINESS_BAR_MET` is `true`. A maintainer sets it after checking the readiness bar: the correctness fixes are merged; the full suite is green on every platform, Windows included, and on Python 3.11 to 3.15; the fault and concurrency probes pass; and the documented API raises no `NotOnNativeYet`. ** The parity run of every platform and every Python version passes with zero `NotOnNativeYet` skips. * Speed parity with the JVM build is not part of the bar. * The speed of the single-record `UPDATE` of the wheel that is published is checked by hand before the publish job is approved, because two native builds of one commit can differ by about a third (xref:development/release-native-smoke.adoc[Speed smoke of the native wheel], https://github.com/ArcadeData/arcadedb-python/issues/404[#404]). diff --git a/docs/modules/ROOT/pages/how-to/concurrency.adoc b/docs/modules/ROOT/pages/how-to/concurrency.adoc index 4c4b27c4..b5756f47 100644 --- a/docs/modules/ROOT/pages/how-to/concurrency.adoc +++ b/docs/modules/ROOT/pages/how-to/concurrency.adoc @@ -348,4 +348,4 @@ On Linux, macOS and Windows the JDK asks the operating system for a flush that r The native wheel is a `py3-none` wheel, and it installed and ran on free-threaded Python 3.14.5 with the GIL off. The Python 3.14t rows in the tables above are those runs: threads, several writers, asyncio and the signal and kill probes. The probe on several processes was not run there. The runs are shorter than those on Python 3.12, as listed at the top of this page. -The JVM package was not run on Python 3.14t. Its wheels up to 26.11.1.dev0 were tagged for 3.11 to 3.14 (`cp314`), so `uv` found no wheel for 3.14t (it reported no wheel with a matching Python version tag for `{jvm-pkg-name}` 26.10.2.post1). The newer wheels are `py3-none`, and JPype has a 3.14t wheel on Linux, so uv can now install the package on 3.14t. No JVM test run has been made there, so treat it as untested. +The JVM package was not run on Python 3.14t. Its wheels up to 26.11.1.dev0 were tagged for 3.11 to 3.14 (`cp314`), so `uv` found no wheel for 3.14t (it reported no wheel with a matching Python version tag for `{jvm-pkg-name}` 26.10.2.post1). The newer wheels are `py3-none`, and JPype has a 3.14t wheel on Linux, so uv can now install the package on 3.14t. No JVM test run has been made there, so treat it as untested. JPype 1.8.0 and later turn the GIL back on when JPype is imported on a free-threaded Python, and Python prints a `RuntimeWarning`, because JPype is not thread safe without the GIL. So with a current JPype, `{jvm-pkg-name}` does not run free-threaded. diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index 5846bb31..eba1f126 100644 --- a/docs/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/index.adoc @@ -90,7 +90,7 @@ Check which one you have with `python -c "import arcadedb; print(arcadedb.__back == Requirements -* Python 3.11 to 3.14, and 3.15 for `{native-pkg-name}`. The wheels' CI runs all four versions on every supported platform for `main`, the nightly run and each release. A pull request runs a smaller selection (xref:development/ci.adoc[Continuous integration]). +* Python 3.11 to 3.15. A release tests all five versions on every supported platform. `main`, the nightly run, and a pull request run smaller selections (xref:development/ci.adoc[Continuous integration]). * Linux (x86_64 and ARM64, glibc: no Alpine), macOS on Apple Silicon (no Intel Mac), or Windows (x86_64). The Windows wheel of the native build is the newest. The glibc floors and the other platforms that are not built are in xref:installation.adoc#requirements[Requirements]. * No Java installation, for either package. diff --git a/docs/modules/ROOT/pages/installation.adoc b/docs/modules/ROOT/pages/installation.adoc index 19dee837..8bd17f78 100644 --- a/docs/modules/ROOT/pages/installation.adoc +++ b/docs/modules/ROOT/pages/installation.adoc @@ -39,7 +39,7 @@ NOTE: *Releases up to 26.11.1.post4 on Python 3.11.* These releases of `{jvm-pkg [[requirements]] == Requirements -* Python 3.11 to 3.14 for both packages. The native package also supports Python 3.15: it is one `py3-none` wheel that loads its library with `ctypes`, and the CI runs a subset of the tests on 3.15. `{jvm-pkg-name}` does not install on 3.15 yet, because its dependency JPype has no 3.15 wheel: its `requires-python` is `>=3.11,<3.15`, but uv does not stop at that upper bound and fails while building JPype from source, so use Python 3.14 or older for it. The cap goes when JPype ships a 3.15 wheel. The CI tests the JVM wheel on all four versions 3.11 to 3.14 on Linux x86_64, and on 3.11 and 3.14 on the other platforms (xref:development/ci.adoc[Continuous integration]). +* 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]). * 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. 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-`, 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. diff --git a/docs/modules/ROOT/pages/which-package.adoc b/docs/modules/ROOT/pages/which-package.adoc index ecb71b6e..d318f1e1 100644 --- a/docs/modules/ROOT/pages/which-package.adoc +++ b/docs/modules/ROOT/pages/which-package.adoc @@ -126,8 +126,8 @@ The API is the same. The runtime is not. These are the differences you can plan | Larger. It carries a Java 25 runtime for its platform. | Python versions -| 3.11 to 3.15. On 3.15 the CI runs a subset of the tests. -| 3.11 to 3.14. JPype has no 3.15 wheel yet, so the package does not install on 3.15: uv tries to build JPype from source and fails. +| 3.11 to 3.15. +| 3.11 to 3.15. On 3.15 it needs JPype 1.8.0 or later, which the package requires by itself. | Platforms | 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]. diff --git a/examples/07_stackoverflow_tables_oltp.py b/examples/07_stackoverflow_tables_oltp.py index e27aba37..edd7d99e 100644 --- a/examples/07_stackoverflow_tables_oltp.py +++ b/examples/07_stackoverflow_tables_oltp.py @@ -37,7 +37,7 @@ # The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION), # fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use). -UV_VERSION = "0.12.0" +UV_VERSION = "0.13.10" def uv_bootstrap_commands(python_cmd: str) -> List[str]: diff --git a/examples/08_stackoverflow_tables_olap.py b/examples/08_stackoverflow_tables_olap.py index 2ac3f1a1..3ac108ad 100644 --- a/examples/08_stackoverflow_tables_olap.py +++ b/examples/08_stackoverflow_tables_olap.py @@ -33,7 +33,7 @@ # The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION), # fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use). -UV_VERSION = "0.12.0" +UV_VERSION = "0.13.10" def uv_bootstrap_commands(python_cmd: str) -> List[str]: diff --git a/examples/09_stackoverflow_graph_oltp.py b/examples/09_stackoverflow_graph_oltp.py index e83b17db..0a873acf 100644 --- a/examples/09_stackoverflow_graph_oltp.py +++ b/examples/09_stackoverflow_graph_oltp.py @@ -39,7 +39,7 @@ # The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION), # fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use). -UV_VERSION = "0.12.0" +UV_VERSION = "0.13.10" def uv_bootstrap_commands(python_cmd: str) -> List[str]: diff --git a/examples/10_stackoverflow_graph_olap.py b/examples/10_stackoverflow_graph_olap.py index e05c4571..df1b6f67 100644 --- a/examples/10_stackoverflow_graph_olap.py +++ b/examples/10_stackoverflow_graph_olap.py @@ -35,7 +35,7 @@ # The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION), # fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use). -UV_VERSION = "0.12.0" +UV_VERSION = "0.13.10" def uv_bootstrap_commands(python_cmd: str) -> List[str]: diff --git a/examples/11_vector_index_build.py b/examples/11_vector_index_build.py index 728b35fc..fdc4dc2d 100644 --- a/examples/11_vector_index_build.py +++ b/examples/11_vector_index_build.py @@ -158,7 +158,7 @@ def resolve_milvus_compose_version(release_tag: str) -> str: # The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION), # fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use). -UV_VERSION = "0.12.0" +UV_VERSION = "0.13.10" def uv_bootstrap_commands(python_cmd: str = "python") -> List[str]: diff --git a/examples/12_vector_search.py b/examples/12_vector_search.py index 6ade0180..4aa53b4f 100644 --- a/examples/12_vector_search.py +++ b/examples/12_vector_search.py @@ -163,7 +163,7 @@ def resolve_milvus_compose_version(release_tag: str) -> str: # The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION), # fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use). -UV_VERSION = "0.12.0" +UV_VERSION = "0.13.10" def uv_bootstrap_commands(python_cmd: str = "python") -> List[str]: diff --git a/native/wheel/README.md b/native/wheel/README.md index 65161f91..df6e3de1 100644 --- a/native/wheel/README.md +++ b/native/wheel/README.md @@ -47,7 +47,7 @@ with arcadedb.create_database("/tmp/demo") as db: ## Platforms -CPython 3.11 to 3.15. One wheel per platform serves every Python version, because the library is loaded with `ctypes` and is not compiled against CPython. The images are built for the baseline CPU of the platform (`-march=compatibility`), so they do not need a special instruction set. On 3.15 the CI runs a subset of the tests, because jpype1 and ladybug, two dependencies of the full test suite, have no 3.15 wheel yet. +CPython 3.11 to 3.15. One wheel per platform serves every Python version, because the library is loaded with `ctypes` and is not compiled against CPython. The images are built for the baseline CPU of the platform (`-march=compatibility`), so they do not need a special instruction set. | Platform | Wheel tag | Note | | ------------------------- | ------------------------ | ------------------------------------------------------------------------------------- | @@ -62,7 +62,7 @@ Intel macOS, Windows arm64 and musl-based Linux (Alpine) are not built and not s - **JVM-only APIs do not exist**: `get_java_database()` and the other `get_java_*` calls, `start_jvm()`, `jvm_kwargs` and JVM options. There is no JVM. Use `arcadedb-jvm` if you need them. - **A few API calls raise `NotOnNativeYet`** (a `NotImplementedError`) instead of misbehaving: `AsyncExecutor.transaction`, `find_nearest_approximate` over product quantization, `get_metadata` of a foreign index, and `get_stats`. -- Python 3.15 and free-threaded Python (3.14t) run a subset of the tests in CI, on the `linux-x86_64` wheel only; a release needs both to pass. The other platforms are not tested on them. +- Free-threaded Python (3.14t) runs a subset of the tests in CI, on the `linux-x86_64` wheel only; a release needs it to pass. The other platforms are not tested on it. The bindings' own tests run against the installed wheel (the parity run). What does not pass is the list above, or JVM-only by nature. diff --git a/pyproject.toml b/pyproject.toml index 9a29483f..126797e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,13 +16,9 @@ name = "arcadedb-jvm" version = "0.0.0" description = "ArcadeDB embedded multi-model database, JVM build with a bundled JRE (no Java installation needed). The native build is the package arcadedb; both import as arcadedb" readme = "README.md" -# The upper bound is JPype: jpype1 1.7.1 has wheels for CPython 3.11 to 3.14 and none for 3.15 (JPype -# merged 3.15 support in jpype-project/jpype#1501, not released yet). The wheels of this package are -# py3-none-, so the wheel tag no longer keeps an installer off an interpreter: without this cap an installer -# would put the wheel on 3.15 and then try to build JPype from source. -# REMOVE THE CAP when jpype1 ships cp315 wheels: then add the 3.15 classifier below, 3.15 to PYTHONS in -# scripts/select_matrix.py and the cap in tests/test_select_matrix.py. -requires-python = ">=3.11,<3.15" +# No upper bound. The wheels of this package are py3-none-, so the wheel tag does not keep an installer off an +# interpreter. The Pythons that CI tests are the classifiers below (PYTHONS in scripts/select_matrix.py). +requires-python = ">=3.11" license = { text = "Apache-2.0" } authors = [ { name = "Taewoon Kim", email = "taewoon@humem.ai" } @@ -37,6 +33,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Topic :: Database", "Topic :: Software Development :: Libraries :: Python Modules", ] @@ -45,9 +42,12 @@ classifiers = [ # holds without an instance goes through JPype, such as the KeyboardInterrupt of a Ctrl-C while a query calls a Python # function, or the StopIteration of next(). CPython 3.12 and later always hold an instance and are not affected. # REMOVE THE CAP when a newer jpype1 passes tests/test_jpype_bare_exceptions.py on Python 3.11. +# FLOOR on CPython 3.15: jpype1 1.8.0 is the first release with cp315 wheels. The floor keeps a resolver from taking an +# older jpype1 on 3.15, which has only a source archive there and would be compiled on the user's machine. dependencies = [ "jpype1>=1.5.0,<1.8; python_version < '3.12'", - "jpype1>=1.5.0; python_version >= '3.12'", + "jpype1>=1.5.0; python_version >= '3.12' and python_version < '3.15'", + "jpype1>=1.8.0; python_version >= '3.15'", ] [tool.uv] diff --git a/scripts/Dockerfile.build b/scripts/Dockerfile.build index 339702bd..7175f865 100644 --- a/scripts/Dockerfile.build +++ b/scripts/Dockerfile.build @@ -7,7 +7,7 @@ # # REQUIRED BUILD ARGS (passed from build.sh): # PYTHON_VERSION - Python that builds the wheel and runs its smoke test (e.g., 3.12). The wheel is py3-none- -# (setup.py), so any of 3.11 to 3.14 gives the same file; the test workflow runs it on each +# (setup.py), so any of 3.11 to 3.15 gives the same file; the test workflow runs it on each # PACKAGE_NAME - always: arcadedb-jvm # PACKAGE_DESCRIPTION - package description # TARGET_PLATFORM - Linux target platform for bundled JRE (linux-x64, linux-arm64) @@ -210,7 +210,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* # Install uv (pinned, the same version as the CI workflows) -ARG UV_VERSION=0.12.0 +ARG UV_VERSION=0.13.10 ENV PATH="/root/.cargo/bin:/root/.local/bin:${PATH}" RUN curl -LsSf "https://astral.sh/uv/${UV_VERSION}/install.sh" | sh && uv --version @@ -236,8 +236,8 @@ COPY README.md ./ # The wheel is built with `build` run through uvx, in an isolated environment that uv creates from [build-system] -# (setuptools, wheel). No jpype1: setup.py never imports it, and a Python without a JPype wheel (3.15, until JPype > 1.7.1) -# would compile it. Nothing is installed into the image's Python, and uv never downloads another one. +# (setuptools, wheel). No jpype1: setup.py never imports it, and a Python without a JPype wheel (a new CPython before JPype +# releases for it) would compile it. Nothing is installed into the image's Python, and uv never downloads another one. ENV UV_PYTHON_DOWNLOADS=never # Re-declare build args for this stage (required after FROM) @@ -333,7 +333,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* # Install uv (pinned, the same version as the CI workflows) -ARG UV_VERSION=0.12.0 +ARG UV_VERSION=0.13.10 ENV PATH="/root/.cargo/bin:/root/.local/bin:${PATH}" RUN curl -LsSf "https://astral.sh/uv/${UV_VERSION}/install.sh" | sh && uv --version diff --git a/scripts/build.sh b/scripts/build.sh index 3db32d4b..16d1a5b5 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -61,7 +61,7 @@ print_usage() { echo "PYTHON_VERSION:" echo " Python of the Linux (Docker) build and its smoke test (default: 3.12); ignored on macOS and Windows." echo " The wheel is py3-none-: the same file whichever Python builds it" - echo " Examples: 3.11, 3.12, 3.13, 3.14" + echo " Examples: 3.11, 3.12, 3.13, 3.14, 3.15" echo "" echo "JAR_LIB_DIR (optional):" echo " Directory containing ArcadeDB JARs to embed" diff --git a/scripts/select_matrix.py b/scripts/select_matrix.py index 0d639b31..1f59db6c 100644 --- a/scripts/select_matrix.py +++ b/scripts/select_matrix.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """Pick the platform x Python legs a CI workflow runs for the event that started it. -The wheels support four platforms and four Python versions. +The wheels support four platforms and five Python versions. CI has two tiers. A pull request runs the fast tier: one platform (linux/amd64), one Python (the newest) and no example legs, so that its checks finish in about 10 minutes (ArcadeData/arcadedb-python#517) and it does not wait @@ -10,19 +10,20 @@ and passes the event `pull_request_full`) runs the legs of a push to main. - `jvm` (test-jvm.yml) runs one leg on a pull request (linux/amd64, the newest Python), cut into - PULL_REQUEST_SHARDS shards that run side by side (scripts/shard_tests.py), 10 legs on - a push to main and the nightly schedule, and all 16 for a release (release-jvm.yml calls the workflow with + PULL_REQUEST_SHARDS shards that run side by side (scripts/shard_tests.py), 11 legs on + a push to main and the nightly schedule, and all 20 for a release (release-jvm.yml calls the workflow with `release: true`, which test-jvm.yml passes as the event `release`) and a manual dispatch. The JVM wheel is one file for each platform (py3-none-, built once by the `build` job), so a Python version is a test leg, - not a build. The 10 legs are all four Pythons on linux/amd64 and the oldest and the newest on the other + not a build. The 11 legs are all five Pythons on linux/amd64 and the oldest and the newest on the other platforms: a bug that depends on the interpreter shows on the ends of the range, and one that depends on the platform shows on any version of it. What is published, and a run started by hand before a release, gets every combination, like test-native.yml. - `examples` (test-python-examples.yml) runs no leg on a pull request (the matrix is empty and the workflow skips - its jobs), also when it changes the examples, and every combination (16 legs) on every other event. + its jobs), also when it changes the examples, and every platform on Python 3.11 to 3.14 (16 legs) on every other + event. 3.15 has no example leg yet (see EXAMPLES_PYTHONS). The selection fails open to the full matrix: an event name this script does not know runs everything, never less -(for `jvm` too: only a pull request, a push and the nightly schedule get fewer than 16 legs). +(for `jvm` too: only a pull request, a push and the nightly schedule get fewer than 20 legs). usage: select_matrix.py jvm [--event NAME] # test-jvm.yml: the test legs @@ -46,7 +47,7 @@ import sys # Temporarily limited to four platforms: macOS x86_64 (runner macos-15-intel) is off. Windows ARM64 (runner -# windows-11-arm exists) is off because neither package can be built there: jpype1 1.7.1 ships no win_arm64 wheel +# windows-11-arm exists) is off because neither package can be built there: jpype1 1.8.0 ships no win_arm64 wheel # (win_amd64 only) and GraalVM CE 25.4.4.1.1 has no Windows ARM64 build (windows-x64 only). This is the platform # column both workflows had before this script. RUNNERS = { @@ -58,10 +59,15 @@ # Every Python the package supports. tests/test_select_matrix.py compares this with the # classifiers of pyproject.toml, so adding a version there without adding it here fails. -PYTHONS = ("3.11", "3.12", "3.13", "3.14") +PYTHONS = ("3.11", "3.12", "3.13", "3.14", "3.15") OLDEST = PYTHONS[0] NEWEST = PYTHONS[-1] +# The Pythons of the example legs. 3.15 waits for the example dependencies: inflate64, pybcj and pyppmd (compiled +# dependencies of py7zr, which unpacks the datasets) publish no cp315 wheel yet, so a 3.15 leg would compile them. +# Add 3.15 here when all three do. +EXAMPLES_PYTHONS = ("3.11", "3.12", "3.13", "3.14") + # The legs of `jvm` on a push and the nightly run (and on a pull request that asks for the full tier): all Pythons on linux/amd64 # (the cheap, fast runner and the one most contributors use), the oldest and the newest on the three other platforms (the shape of # test-native.yml). The wheel is py3-none-, one file for each platform, so these are test legs against that file, not builds. @@ -127,7 +133,8 @@ def select(workflow: str, event: str) -> dict[str, list[dict[str, str]]]: return {"include": _sharded(legs, PULL_REQUEST_SHARDS)} if workflow == "jvm" and event in JVM_REDUCED_EVENTS: return {"include": _legs(JVM_LEGS)} - return {"include": _legs({platform: PYTHONS for platform in RUNNERS})} + pythons = EXAMPLES_PYTHONS if workflow == "examples" else PYTHONS + return {"include": _legs({platform: pythons for platform in RUNNERS})} def select_wheels(workflow: str, event: str) -> dict[str, list[dict[str, str]]]: diff --git a/scripts/select_native_matrix.py b/scripts/select_native_matrix.py index 01b8f57f..16863d5a 100644 --- a/scripts/select_native_matrix.py +++ b/scripts/select_native_matrix.py @@ -3,11 +3,11 @@ A native image build takes about 5 to 30 minutes per platform and the ArcadeData organisation shares a runner cap with upstream ArcadeDB, so a pull request (the fast tier) builds one platform (linux-x86_64) and runs the parity suite on one Python, the -newest (3.14), cut into PULL_REQUEST_SHARDS shards that run side by side (scripts/shard_tests.py), and only when native paths changed +newest (3.15), cut into PULL_REQUEST_SHARDS shards that run side by side (scripts/shard_tests.py), and only when native paths changed (the workflow's `paths` filter). It runs no `pyver` leg and no example leg: its checks are meant to finish in about 10 minutes (ArcadeData/arcadedb-python#517). Push to main, the nightly run and a dispatch build all four -platforms and test Python 3.12 and 3.14 on each. A release (release-native.yml calls the workflow with `release: true`) tests every -supported Python (3.11 to 3.14) on all four. A pull request that asks for the full tier (the label `ci:full`, or a Dependabot author; +platforms and test Python 3.12 and 3.15 on each. A release (release-native.yml calls the workflow with `release: true`) tests every +supported Python (3.11 to 3.15) on all four. A pull request that asks for the full tier (the label `ci:full`, or a Dependabot author; scripts/ci_tier.py decides and passes the event `pull_request_full`) runs the legs of a push to main. usage: select_native_matrix.py EVENT EVENT: pull_request | pull_request_full | push | schedule | workflow_dispatch | release @@ -85,14 +85,14 @@ } # Python versions the wheel supports (the classifiers of native/wheel/pyproject.toml). -ALL_PYTHONS = ["3.11", "3.12", "3.13", "3.14"] +ALL_PYTHONS = ["3.11", "3.12", "3.13", "3.14", "3.15"] -# Pythons the wheel supports (classifiers too) that only the `pyver` job covers: the full parity run installs test dependencies that have no wheel -# for them yet (jpype1 1.7.1 and ladybug have no cp315 wheel; test_parameter_binding.py imports jpype at module level). The wheel itself is -# py3-none: the library is loaded with ctypes, so only the pure-Python layer depends on the interpreter. -PYVER_ONLY_PYTHONS = ["3.15"] -# Pythons whose pyver leg runs without jpype1, and so without the test files that need it (test-native.yml drops them) -NO_JPYPE_PYTHONS = ["3.15"] +# Pythons the wheel supports (classifiers too) that only the `pyver` job covers, because the full parity run installs test dependencies that +# have no wheel for them yet. None today; a new CPython goes here until jpype1, ladybug and the others publish wheels for it. The wheel +# itself is py3-none: the library is loaded with ctypes, so only the pure-Python layer depends on the interpreter. +PYVER_ONLY_PYTHONS: list[str] = [] +# Pythons whose pyver leg runs without jpype1, and so without the test files that need it (test-native.yml drops them). None today. +NO_JPYPE_PYTHONS: list[str] = [] # Platforms whose parity run must pass before a pre-release (A.B.C.devN) is published. Windows is the newest wheel and is # informational for a pre-release; a FINAL release needs all four (see ALL_PLATFORMS and release-native.yml). @@ -106,21 +106,22 @@ PYVER_NOTE = "gates a release: release-native.yml requires a native-passed-pyver-py marker for each leg of a release" PULL_REQUEST_PLATFORMS = ["linux-x86_64"] -# The newest Python the full parity suite runs on (3.15 has no jpype1 wheel yet and gets the `pyver` subset in the full tier). +# The newest Python the full parity suite runs on. PULL_REQUEST_PYTHONS = [ALL_PYTHONS[-1]] # The shards of the parity run of a pull request: the suite takes about 9 minutes in one job, and after a native image build # (9 to 12 minutes, when the pull request changes the library) the shards must be short. With three shards such a pull request # could wait more than 15 minutes (ArcadeData/arcadedb-python#528). The longest file takes about 1.5 minutes, so more shards than # this gain little. PULL_REQUEST_SHARDS = 5 -MAIN_PYTHONS = ["3.12", "3.14"] -# The Pythons of the `examples` job (the examples of examples/ against the installed wheel): the parity Pythons of a push, the nightly run and a -# dispatch. A release runs the parity suite on every supported Python, but the examples only on these two. +MAIN_PYTHONS = ["3.12", ALL_PYTHONS[-1]] +# The Pythons of the `examples` job (the examples of examples/ against the installed wheel), on every platform of a full-tier run. Not 3.15 +# yet: inflate64, pybcj and pyppmd (compiled dependencies of py7zr, which the examples use) publish no cp315 wheel, so the job would compile +# them. A release runs the parity suite on every supported Python, but the examples only on these two. EXAMPLES_PYTHONS = ["3.12", "3.14"] def pyver_legs(covered: list[str]) -> list[dict]: - """The legs of the cheap Python-version job: every supported Python that `covered` (the full parity run) leaves out, 3.15 and the free-threaded 3.14t.""" + """The legs of the cheap Python-version job: every supported Python that `covered` (the full parity run) leaves out, and the free-threaded 3.14t.""" return [ { "python": py, @@ -155,11 +156,21 @@ def select(event: str) -> dict: for k in platforms for py in pythons ] - examples = [leg for leg in test if leg["python"] in EXAMPLES_PYTHONS] + # the examples have their own Pythons: not every one of them is a parity Python of every event + examples = [ + { + "key": k, + "runner": PLATFORMS[k]["runner"], + "python": py, + "test_minutes": PLATFORMS[k]["test_minutes"], + } + for k in platforms + for py in EXAMPLES_PYTHONS + ] pyver = pyver_legs(pythons) if event == "pull_request": # The fast tier is one platform and one Python: the other Pythons (the `pyver` job) and the examples, the slowest job (about - # 20 minutes), run on main, every night, on a manual run and for a release (where 3.15 and 3.14t are a gate). + # 20 minutes), run on main, every night, on a manual run and for a release (where 3.14t is a gate). # test-native.yml skips a job when its list is empty. pyver, examples = [], [] test = [ diff --git a/tests/test_dev_engine_pin.py b/tests/test_dev_engine_pin.py index 0e997e58..032615ee 100644 --- a/tests/test_dev_engine_pin.py +++ b/tests/test_dev_engine_pin.py @@ -171,11 +171,11 @@ def test_the_weekly_run_is_never_skipped_and_builds_one_platform(tmp_path): assert [leg["key"] for leg in json.loads(lines["build"])] == ["linux-x86_64"] # the legs of a pull request: one Python, the newest, in shards, and no pyver or example leg assert [(leg["python"], leg["shard"]) for leg in json.loads(lines["test"])] == [ - ("3.14", "1/5"), - ("3.14", "2/5"), - ("3.14", "3/5"), - ("3.14", "4/5"), - ("3.14", "5/5"), + ("3.15", "1/5"), + ("3.15", "2/5"), + ("3.15", "3/5"), + ("3.15", "4/5"), + ("3.15", "5/5"), ] assert json.loads(lines["pyver"]) == [] assert json.loads(lines["examples"]) == [] diff --git a/tests/test_native_wheel_template.py b/tests/test_native_wheel_template.py index 1e4a277c..a89060f7 100644 --- a/tests/test_native_wheel_template.py +++ b/tests/test_native_wheel_template.py @@ -28,12 +28,8 @@ def pythons(path): if c.startswith("Programming Language :: Python :: 3.") ] - # The native wheel is py3-none (ctypes) and also runs on Python 3.15; the JVM wheel cannot claim 3.15 until - # JPype ships cp315 wheels. That is the only allowed difference: the JVM wheel's set is the native one minus 3.15. native, jvm = pythons(WHEEL / "pyproject.toml"), pythons(ROOT / "pyproject.toml") - native_only = {"Programming Language :: Python :: 3.15"} - assert [c for c in native if c not in native_only] == jvm - assert set(native) - set(jvm) <= native_only + assert native == jvm def test_the_pypi_description_names_the_sibling_in_its_first_paragraph(): diff --git a/tests/test_release_native_verify.py b/tests/test_release_native_verify.py index 4ea57560..f8c0d13f 100644 --- a/tests/test_release_native_verify.py +++ b/tests/test_release_native_verify.py @@ -24,8 +24,8 @@ "macos-arm64": "macosx_11_0_arm64", "windows-x64": "win_amd64", } -PYTHONS = ["3.11", "3.12", "3.13", "3.14"] -PYVER_PYTHONS = ["3.15", "3.14t"] +PYTHONS = ["3.11", "3.12", "3.13", "3.14", "3.15"] +PYVER_PYTHONS = ["3.14t"] def _script() -> str: diff --git a/tests/test_select_matrix.py b/tests/test_select_matrix.py index 4153ed5b..96868564 100644 --- a/tests/test_select_matrix.py +++ b/tests/test_select_matrix.py @@ -19,16 +19,18 @@ "examples": ROOT / ".github" / "workflows" / "test-python-examples.yml", } -# The full matrix of both workflows: 4 platforms x 4 Pythons. Written out here on purpose, not -# imported from the script, so the full matrix cannot shrink unnoticed. +# The full matrix: 4 platforms x 5 Pythons for the unit tests, x 4 for the examples (no example leg on 3.15 yet). Written out +# here on purpose, not imported from the script, so the full matrix cannot shrink unnoticed. PLATFORMS = { "linux/amd64": "ubuntu-24.04", "linux/arm64": "ubuntu-24.04-arm", "darwin/arm64": "macos-15", "windows/amd64": "windows-2025", } -PYTHONS = ["3.11", "3.12", "3.13", "3.14"] +PYTHONS = ["3.11", "3.12", "3.13", "3.14", "3.15"] FULL = {(p, v) for p, v in itertools.product(PLATFORMS, PYTHONS)} +EXAMPLES_PYTHONS = ["3.11", "3.12", "3.13", "3.14"] +EXAMPLES_FULL = {(p, v) for p, v in itertools.product(PLATFORMS, EXAMPLES_PYTHONS)} NON_PULL_REQUEST_EVENTS = [ "pull_request_full", "push", @@ -70,19 +72,19 @@ def _pairs(matrix): def test_every_event_but_pull_request_runs_the_full_examples_matrix(event): matrix = sm.select("examples", event) assert len(matrix["include"]) == 16 - assert _pairs(matrix) == FULL + assert _pairs(matrix) == EXAMPLES_FULL @pytest.mark.parametrize("event", ["pull_request_full", "push", "schedule"]) -def test_jvm_tests_the_one_wheel_of_a_platform_on_ten_legs_on_a_push_the_nightly_and_a_full_tier_pull_request( +def test_jvm_tests_the_one_wheel_of_a_platform_on_eleven_legs_on_a_push_the_nightly_and_a_full_tier_pull_request( event, ): # The wheel is py3-none-: every Python of linux/amd64, the oldest and the newest elsewhere (as test-native.yml) pairs = _pairs(sm.select("jvm", event)) assert {v for p, v in pairs if p == "linux/amd64"} == set(PYTHONS) for platform in ("linux/arm64", "darwin/arm64", "windows/amd64"): - assert {v for p, v in pairs if p == platform} == {"3.11", "3.14"}, platform - assert len(pairs) == 10 + assert {v for p, v in pairs if p == platform} == {"3.11", "3.15"}, platform + assert len(pairs) == 11 @pytest.mark.parametrize( @@ -92,15 +94,15 @@ def test_jvm_tests_every_platform_and_python_for_a_release_a_dispatch_and_any_ot event, ): # What is published (release-jvm.yml passes release: true, test-jvm.yml turns it into the event `release`), a run - # started by hand before a release, and any event the script does not know (it fails open) get all 16 legs + # started by hand before a release, and any event the script does not know (it fails open) get all 20 legs matrix = sm.select("jvm", event) - assert len(matrix["include"]) == 16 + assert len(matrix["include"]) == 20 assert _pairs(matrix) == FULL def test_a_pull_request_runs_the_fast_tier_of_the_jvm_tests(): # one platform and one Python, the newest (#517): no macOS, Windows or arm64 runner is waited for - assert _pairs(sm.select("jvm", "pull_request")) == {("linux/amd64", "3.14")} + assert _pairs(sm.select("jvm", "pull_request")) == {("linux/amd64", "3.15")} # in shards that run side by side, every one from 1 to N legs = sm.select("jvm", "pull_request")["include"] count = sm.PULL_REQUEST_SHARDS @@ -221,20 +223,34 @@ def test_pythons_match_the_classifiers_of_pyproject(): assert classifiers, "no Python version classifiers found in pyproject.toml" assert list(sm.PYTHONS) == classifiers # The oldest Python of the matrix is the floor of requires-python, so dropping or adding the - # oldest one cannot leave the install metadata saying something else. The ceiling is the minor after - # the newest: the wheel is py3-none, so its tag no longer keeps pip off a Python the matrix does not - # cover (3.15 has no JPype wheel yet), and requires-python has to. Remove it with the JPype cap - # in pyproject.toml. - newest_minor = int(sm.PYTHONS[-1].split(".")[1]) - assert project["requires-python"] == f">={sm.PYTHONS[0]},<3.{newest_minor + 1}" + # oldest one cannot leave the install metadata saying something else. There is no upper bound. + assert project["requires-python"] == f">={sm.PYTHONS[0]}" + + +def test_jpype1_is_capped_below_python_3_12_and_floored_on_python_3_15(): + # 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 + # with cp315 wheels: an older one on 3.15 would be compiled from its source archive. + project = tomllib.loads((ROOT / "pyproject.toml").read_text(encoding="utf-8"))[ + "project" + ] + assert project["dependencies"] == [ + "jpype1>=1.5.0,<1.8; python_version < '3.12'", + "jpype1>=1.5.0; python_version >= '3.12' and python_version < '3.15'", + "jpype1>=1.8.0; python_version >= '3.15'", + ] + + +def test_the_example_pythons_are_supported_pythons(): + assert set(sm.EXAMPLES_PYTHONS) < set(sm.PYTHONS) + assert list(sm.EXAMPLES_PYTHONS) == EXAMPLES_PYTHONS def test_command_line_prints_one_line_of_matrix_json(): for event, count in ( ("pull_request", 2), - ("pull_request_full", 10), - ("push", 10), - ("release", 16), + ("pull_request_full", 11), + ("push", 11), + ("release", 20), ): out = subprocess.run( # nosec B603 - fixed argument list, no untrusted input [sys.executable, "-I", str(SCRIPT_PATH), "jvm", "--event", event], diff --git a/tests/test_select_native_matrix.py b/tests/test_select_native_matrix.py index dc0ef5b5..7edced81 100644 --- a/tests/test_select_native_matrix.py +++ b/tests/test_select_native_matrix.py @@ -25,7 +25,7 @@ def test_pull_request_builds_one_platform_and_tests_one_python(): assert [ (t["key"], t["python"], t["shard"], t["suffix"]) for t in chosen["test"] ] == [ - ("linux-x86_64", "3.14", f"{i}/{count}", f"-shard{i}") + ("linux-x86_64", "3.15", f"{i}/{count}", f"-shard{i}") for i in range(1, count + 1) ] assert chosen["pyver"] == [] and chosen["examples"] == [] @@ -86,8 +86,14 @@ def test_main_nightly_and_dispatch_build_all_four_platforms(): def test_a_release_tests_every_supported_python_on_every_platform(): chosen = sel.select("release") assert len(chosen["build"]) == 4 - assert len(chosen["test"]) == 4 * 4 - assert {t["python"] for t in chosen["test"]} == {"3.11", "3.12", "3.13", "3.14"} + assert len(chosen["test"]) == 4 * 5 + assert {t["python"] for t in chosen["test"]} == { + "3.11", + "3.12", + "3.13", + "3.14", + "3.15", + } def test_pythons_are_the_classifiers_of_the_native_wheel(): @@ -134,7 +140,7 @@ def test_the_script_prints_github_output_lines(): assert [leg["python"] for leg in json.loads(full[2].split("=", 1)[1])] == [ "3.11", "3.13", - "3.15", + "3.14", "3.14t", ] @@ -147,10 +153,9 @@ def _pyver(event): def test_the_python_version_job_covers_what_the_full_parity_run_leaves_out(): - # a pull request (the fast tier) runs one Python, the parity suite on 3.14: every other Python waits for the full tier + # a pull request (the fast tier) runs one Python, the parity suite on 3.15: every other Python waits for the full tier assert _pyver("pull_request") == [] - # the selection itself still knows what one full Python leaves out: the other three Pythons, 3.15 (no jpype1 wheel yet) and the - # free-threaded one + # the selection itself still knows what one full Python leaves out: the other four Pythons and the free-threaded one assert [ (leg["python"], leg["freethreaded"], leg["polars"], leg["jpype"]) for leg in sel.pyver_legs(sel.PULL_REQUEST_PYTHONS) @@ -158,22 +163,19 @@ def test_the_python_version_job_covers_what_the_full_parity_run_leaves_out(): ("3.11", False, True, True), ("3.12", False, True, True), ("3.13", False, True, True), - ("3.15", False, True, False), + ("3.14", False, True, True), ("3.14t", True, False, True), ] - # main, nightly, dispatch and a pull request that asks for the full tier test 3.12 and 3.14 in full + # main, nightly, dispatch and a pull request that asks for the full tier test 3.12 and 3.15 in full for event in ("pull_request_full", "push", "schedule", "workflow_dispatch"): assert _pyver(event) == [ ("3.11", False, True, True), ("3.13", False, True, True), - ("3.15", False, True, False), + ("3.14", False, True, True), ("3.14t", True, False, True), ] - # a release tests 3.11 to 3.14 in full: 3.15 and the free-threaded build are left - assert _pyver("release") == [ - ("3.15", False, True, False), - ("3.14t", True, False, True), - ] + # a release tests 3.11 to 3.15 in full: only the free-threaded build is left + assert _pyver("release") == [("3.14t", True, False, True)] def test_the_python_version_job_never_repeats_a_full_parity_leg_and_has_no_polars_on_a_free_threaded_python(): From 5a888892b9ae52e4f0616bd0ea4cc2474717fd7c Mon Sep 17 00:00:00 2001 From: Taewoon Kim Date: Mon, 30 Nov 2026 01:25:18 +0900 Subject: [PATCH 2/2] test: read address 0 through ctypes, because Python 3.15 has no faulthandler._read_null All 3.15 legs of the pull request failed on tests/test_parity_crash_retry.py. Two child programs used the private faulthandler._read_null() to die of a real memory fault, and CPython 3.15 removed it, so the child ended with an AttributeError (exit 1) instead. ctypes.c_int.from_address(0).value is the same read of address 0 in ctypes' own C code, outside a ctypes function call, so Windows does not turn the access violation into an OSError. --- tests/test_parity_crash_retry.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/test_parity_crash_retry.py b/tests/test_parity_crash_retry.py index f3030ada..b206332a 100644 --- a/tests/test_parity_crash_retry.py +++ b/tests/test_parity_crash_retry.py @@ -236,10 +236,11 @@ def test_a_result_followed_by_an_odd_exit_code_is_noticed_but_not_a_crash(): SEGV = """ import os, sys if sys.platform == "win32": - # a real access violation (0xC0000005); ctypes would turn one into an OSError, and raise(SIGSEGV) exits with 3 - import ctypes, faulthandler + # a real access violation (0xC0000005): ctypes reads address 0 in its own code. A fault inside a ctypes function + # call would become an OSError, and raise(SIGSEGV) exits with 3. (faulthandler._read_null() is gone in Python 3.15.) + import ctypes ctypes.windll.kernel32.SetErrorMode(0x8003) # no crash dialog and no Windows Error Reporting for this child - faulthandler._read_null() + ctypes.c_int.from_address(0).value else: import resource, signal resource.setrlimit(resource.RLIMIT_CORE, (0, 0)) # no core file for a test child @@ -458,15 +459,13 @@ def test_the_harness_retry_is_off_unless_asked_for(): # --------------------------------------------------------------------------------------------------------------------------------- FAULT_CHILD = """ -import faulthandler, os, sys +import ctypes, faulthandler, os, sys if os.name == "posix": import resource resource.setrlimit(resource.RLIMIT_CORE, (0, 0)) # no core file for a test child else: - import ctypes - ctypes.windll.kernel32.SetErrorMode(0x8003) # no crash dialog and no Windows Error Reporting for this child sys.path.insert(0, sys.argv[1]) @@ -502,7 +501,7 @@ def test_the_harness_retry_is_off_unless_asked_for(): conftest.pytest_configure(None) assert faulthandler.is_enabled(), "native on win32 with the variable" print("configured", flush=True) -faulthandler._read_null() # a read of address 0: an access violation on Windows, SIGSEGV elsewhere +ctypes.c_int.from_address(0).value # a read of address 0: an access violation on Windows, SIGSEGV elsewhere """