Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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. |
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions THIRD-PARTY-LICENSES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 4 additions & 8 deletions requirements-testing.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion rust-bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
4 changes: 2 additions & 2 deletions rust-bindings/src/expr/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion skills/eval-bindings/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ When reviewing `rust-bindings/src/<component>/`, 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<T>` 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
Expand Down
Loading