diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml index 916e7435..2018f8cb 100644 --- a/.github/workflows/code_quality.yml +++ b/.github/workflows/code_quality.yml @@ -18,7 +18,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] uses: OpenJobDescription/.github/.github/workflows/reusable_python_build.yml@mainline with: os: ${{ matrix.os }} diff --git a/AGENTS.md b/AGENTS.md index 6c5bc60b..afdfac0c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -39,7 +39,7 @@ cargo test --manifest-path rust-bindings/Cargo.toml cargo test --manifest-path rust-bindings/Cargo.toml --doc ``` -Python: **3.9+** (declared via `abi3-py39` in `rust-bindings/Cargo.toml`, enforced by `pyproject.toml` `requires-python`). +Python: **3.10+** (declared via `abi3-py310` in `rust-bindings/Cargo.toml`, enforced by `pyproject.toml` `requires-python`). ## Component Map @@ -199,7 +199,7 @@ Items the `eval-bindings` skill checks; these are the recurring sources of behav - **Type conversions** — `IntoPyObject`/`FromPyObject` impls must preserve types faithfully. Watch the `int` ↔ `i64`/`u64` boundary, `float` NaN/Inf passthrough, `pathlib.Path` ↔ `Path`/`PathBuf`, and ordered vs unordered collections. - **GIL handling** — long-running Rust calls (sessions subprocess wait, large template parses) should release the GIL via `Python::allow_threads`. Holding the GIL across blocking I/O blocks every other Python thread. - **`#[pyclass]` constructor signatures** — Python `__init__` signatures must match what the spec advertises. Keep `#[pyo3(signature = ...)]` aligned with `text_signature` and the spec. -- **ABI3 compatibility** — `Cargo.toml` declares `abi3-py39`. Don't introduce code that uses Python C-API features beyond ABI3. +- **ABI3 compatibility** — `Cargo.toml` declares `abi3-py310`. Don't introduce code that uses Python C-API features beyond ABI3. - **Stub generation** — `scripts/generate_stubs.sh` runs the `stub_gen` binary and produces `src/openjd/_openjd_rs.pyi`. The stub must match the bindings; regenerate it whenever you change a public symbol's signature. ### Coding Style @@ -215,7 +215,7 @@ PRs run these checks (all must pass): | Workflow | What it does | |----------|--------------| -| **Code Quality** (`code_quality.yml`) | Python build + tests on `{ubuntu, windows, macos} × {3.9, 3.10, 3.11, 3.12, 3.13, 3.14}`. Uses the shared `OpenJobDescription/.github` reusable workflow, which runs `hatch run lint`, `hatch run typing`, and `hatch run test`. Transitively builds the Rust extension via the `maturin develop` step in `hatch.toml`. | +| **Code Quality** (`code_quality.yml`) | Python build + tests on `{ubuntu, windows, macos} × {3.10, 3.11, 3.12, 3.13, 3.14}`. Uses the shared `OpenJobDescription/.github` reusable workflow, which runs `hatch run lint`, `hatch run typing`, and `hatch run test`. Transitively builds the Rust extension via the `maturin develop` step in `hatch.toml`. | | **Rust Quality** (`rust_quality.yml`) | `cargo build --all-targets`, `cargo clippy --all-targets -- -D warnings` (hard gate), `cargo test`, and `cargo test --doc` against `rust-bindings/`. Runs on `{ubuntu, windows, macos}`. Resolves `openjd-*` dependencies from crates.io at the versions pinned in `rust-bindings/Cargo.toml`. | | **CodeQL** (`codeql.yml`) | GitHub's static analysis. | | **PR opened/responded/auto_approve/stale_prs_and_issues/record_pr** | Repo housekeeping; not relevant to code changes. | diff --git a/Cargo.lock b/Cargo.lock index 7f0f4b1e..6bdf6dbc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1702,9 +1702,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.53.1" +version = "1.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" +checksum = "ce3335fa71841cda333a58d7615b03901380ecf09d59b3296d21f8bbac0dde4e" dependencies = [ "bytes", "libc", diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index c9efd04c..7eb3178a 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -16,7 +16,7 @@ Table of Contents: To develop the Python code in this repository you will need: -1. Python 3.9 or higher. We recommend [mise](https://github.com/jdx/mise) if you would like to run more than one version +1. Python 3.10 or higher. We recommend [mise](https://github.com/jdx/mise) if you would like to run more than one version of Python on the same system. When running unit tests against all supported Python versions, for instance. 2. The [hatch](https://github.com/pypa/hatch) package installed (`pip install --upgrade hatch`) into your Python environment. diff --git a/README.md b/README.md index c0aa4a32..c60204a4 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Open Job Description [Wiki on GitHub](https://github.com/OpenJobDescription/open This library requires: -1. Python 3.9 or higher; and +1. Python 3.10 or higher; and 2. Linux, MacOS, or Windows operating system. ## Versioning diff --git a/THIRD-PARTY-LICENSES.txt b/THIRD-PARTY-LICENSES.txt index 34294a02..273fb340 100644 --- a/THIRD-PARTY-LICENSES.txt +++ b/THIRD-PARTY-LICENSES.txt @@ -24,7 +24,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------ -** pydantic; version 2.14.1 -- https://pypi.org/project/pydantic/ +** pydantic; version 2.14.3 -- https://pypi.org/project/pydantic/ The MIT License (MIT) Copyright (c) 2017 to present Pydantic Services Inc. and individual contributors. @@ -48,7 +48,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------ -** pydantic_core; version 2.50.1 -- https://pypi.org/project/pydantic_core/ +** pydantic_core; version 2.50.4 -- https://pypi.org/project/pydantic_core/ The MIT License (MIT) Copyright (c) 2022 Samuel Colvin @@ -95,7 +95,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------ -** typing-inspection; version 0.4.4 -- https://pypi.org/project/typing-inspection/ +** typing-inspection; version 0.4.5 -- https://pypi.org/project/typing-inspection/ MIT License Copyright (c) Pydantic Services Inc. 2025 to present @@ -3239,7 +3239,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. ------ ** tokio-util; version 0.7.19 -- https://crates.io/crates/tokio-util -** tokio; version 1.53.1 -- https://crates.io/crates/tokio +** tokio; version 1.53.3 -- https://crates.io/crates/tokio MIT License Copyright (c) Tokio Contributors diff --git a/hatch.toml b/hatch.toml index 41116c78..dc6b2b78 100644 --- a/hatch.toml +++ b/hatch.toml @@ -31,7 +31,7 @@ lint = [ ] [[envs.all.matrix]] -python = ["3.9", "3.10", "3.11", "3.12"] +python = ["3.10", "3.11", "3.12"] [envs.release] detached = true diff --git a/pyproject.toml b/pyproject.toml index b511c9f5..ba145c9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,14 +15,13 @@ authors = [ dynamic = ["version"] readme = "README.md" license = "Apache-2.0" -requires-python = ">=3.9" +requires-python = ">=3.10" description = "Provides a Python implementation of the data model for Open Job Description's template schemas." # https://pypi.org/classifiers/ classifiers = [ "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", diff --git a/requirements-testing.txt b/requirements-testing.txt index 19372ebb..6815b05f 100644 --- a/requirements-testing.txt +++ b/requirements-testing.txt @@ -1,21 +1,17 @@ coverage[toml] == 7.* -pytest == 9.1.*; python_version >= "3.10" -pytest == 8.4.*; python_version < "3.10" +pytest == 9.1.* pytest-cov == 7.1.* pytest-timeout == 2.4.* pytest-xdist == 3.8.* types-PyYAML ~= 6.0 # Pinned to 25.x because black 26+ produces different formatting output # that is incompatible with black 25 (last version supporting Python 3.9). -black == 25.12.*; python_version >= "3.10" -black == 25.11.*; python_version < "3.10" +black == 25.12.* ruff == 0.15.* -mypy == 2.3.*; python_version >= "3.10" -mypy == 1.19.*; python_version < "3.10" +mypy == 2.3.* # pydantic: required by the legacy model_v0 (Pydantic) test suite, # which lives alongside the new Rust-backed model_v1 implementation. pydantic >= 2.10, < 3 # hypothesis: used by the opt-in fuzz test suites in test/openjd/expr # and test/openjd/model-v*. conftest.py imports it unconditionally. -hypothesis ~= 6.161; python_version >= "3.10" -hypothesis ~= 6.141; python_version < "3.10" +hypothesis ~= 6.161 diff --git a/rust-bindings/Cargo.toml b/rust-bindings/Cargo.toml index 28cc6c4b..3306161c 100644 --- a/rust-bindings/Cargo.toml +++ b/rust-bindings/Cargo.toml @@ -18,7 +18,7 @@ openjd-sessions = "0.8.1" tokio = { version = "1", features = ["rt-multi-thread"] } uuid = { version = "1", features = ["v4"] } serde_json = "1" -pyo3 = { version = "0.29.3", features = ["abi3-py39"] } +pyo3 = { version = "0.29.3", features = ["abi3-py310"] } pyo3-log = "0.13" log = "0.4" pyo3-stub-gen = { version = "0.23", optional = true } diff --git a/rust-bindings/src/expr/errors.rs b/rust-bindings/src/expr/errors.rs index f37654ca..3982ad68 100644 --- a/rust-bindings/src/expr/errors.rs +++ b/rust-bindings/src/expr/errors.rs @@ -15,8 +15,8 @@ //! with `#[pymethods]` declaring everything natively. PyO3 only //! supports subclassing built-in exceptions on Python 3.12+ when //! the `abi3` feature is enabled (per PyO3's exception guide), and -//! this crate targets `abi3-py39` to support every interpreter -//! from 3.9 forward. So `#[pyclass(extends = PyValueError)]` is off +//! this crate targets `abi3-py310` to support every interpreter +//! from 3.10 forward. So `#[pyclass(extends = PyValueError)]` is off //! the table for these classes. //! //! The next-cleanest model — and the one used here — is to keep diff --git a/skills/eval-bindings/SKILL.md b/skills/eval-bindings/SKILL.md index 5ff49655..4e01bedc 100644 --- a/skills/eval-bindings/SKILL.md +++ b/skills/eval-bindings/SKILL.md @@ -121,7 +121,7 @@ When reviewing `rust-bindings/src//`, the agent **MUST** check the fo - **GIL handling**: Long-running Rust calls **SHOULD** use `Python::allow_threads` to release the GIL. Holding the GIL across blocking I/O (sessions subprocess wait, snapshots S3 ops) blocks every other Python thread. - **`#[pyclass]` constructor signatures**: Python `__init__` signatures must match what the spec advertises. Look for `#[pyo3(signature = ...)]` mismatches against `text_signature` and the spec. - **`Py` lifetime correctness**: Make sure objects passed across the boundary are not reborrowed in ways that cause `BorrowMutError` or use-after-free in PyO3 0.20+ semantics. -- **ABI3 compatibility**: `Cargo.toml` declares `abi3-py39`. Any binding code that uses Python C API features beyond ABI3 will fail at compile time on a strict ABI3 build — but check that there are no quietly-leaked feature flags. +- **ABI3 compatibility**: `Cargo.toml` declares `abi3-py310`. Any binding code that uses Python C API features beyond ABI3 will fail at compile time on a strict ABI3 build — but check that there are no quietly-leaked feature flags. - **Stub generation**: `cargo run --bin stub_gen` produces `src/openjd/_openjd_rs.pyi`. This file **MUST** match the bindings; if it has drifted, regenerate it during the evaluation. ### Evaluation Procedure