Skip to content

Commit 23fe811

Browse files
committed
chore(deps): bump pytest, black, mypy, hypothesis with Py39 compat
Update dev dependencies to their latest versions while maintaining Python 3.9 support via environment markers: - pytest: 8.4.* -> 9.1.* (Py39 stays on 8.4.*) - black: 25.* -> 26.* (Py39 stays on 25.*) - mypy: 1.19.* -> 2.2.* (Py39 stays on 1.19.*) - hypothesis: ~=6.0 -> ~=6.156 (Py39 gets ~=6.141) All four packages dropped Python 3.9 support in their latest major releases. This uses the same conditional pattern as openjd-cli. Supersedes #300, #301, #302, #303. Signed-off-by: Jericho Tolentino <68654047+jericht@users.noreply.github.com>
1 parent 6062517 commit 23fe811

17 files changed

Lines changed: 14 additions & 32 deletions

requirements-testing.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
coverage[toml] == 7.*
2-
pytest == 8.4.*
2+
pytest == 9.1.*; python_version >= "3.10"
3+
pytest == 8.4.*; python_version < "3.10"
34
pytest-cov == 7.1.*
45
pytest-timeout == 2.4.*
56
pytest-xdist == 3.8.*
67
types-PyYAML ~= 6.0
7-
black == 25.*
8+
black == 26.*; python_version >= "3.10"
9+
black == 25.11.*; python_version < "3.10"
810
ruff == 0.15.*
9-
mypy == 1.19.*
11+
mypy == 2.2.*; python_version >= "3.10"
12+
mypy == 1.19.*; python_version < "3.10"
1013
# pydantic: required by the legacy model_v0 (Pydantic) test suite,
1114
# which lives alongside the new Rust-backed model_v1 implementation.
1215
pydantic >= 2.10, < 3
1316
# hypothesis: used by the opt-in fuzz test suites in test/openjd/expr
1417
# and test/openjd/model-v*. conftest.py imports it unconditionally.
15-
hypothesis ~= 6.0
18+
hypothesis ~= 6.156; python_version >= "3.10"
19+
hypothesis ~= 6.141; python_version < "3.10"

src/openjd/expr/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
HostContext,
3838
)
3939

40-
4140
# Note: the `__module__` / `__name__` / `__qualname__` of the Rust-backed
4241
# exceptions (ExpressionError, FormatStringValidationError, etc.) are set by
4342
# the `_openjd_rs` module init in Rust to their canonical user-facing values

src/openjd/model/_v1/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
# from openjd.model._v1 import template, job, types, errors
6767
from . import errors, job, template, types # noqa: F401
6868

69-
7069
# ── Python-only types ──
7170

7271

@@ -92,7 +91,6 @@
9291

9392
from .._version import version # noqa: E402
9493

95-
9694
__all__ = (
9795
# Submodules
9896
"errors",

src/openjd/model/_v1/template.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
HiddenOnlyUserInterface,
8282
)
8383

84-
8584
# Short aliases for ergonomics. Both names refer to the same class
8685
# object — ``Action is TemplateAction`` is True.
8786
Action = TemplateAction

test/openjd/expr/test_known_gaps.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
SymbolTable,
2424
)
2525

26-
2726
# ── SymbolTable['Key'] = value when Key is already a subtable ──
2827
#
2928
# Reference (``_set_path`` with a single-component key):

test/openjd/expr/test_parsing.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,30 +61,24 @@ def test_leading_and_trailing_whitespace(self) -> None:
6161
assert evaluate_expression(" \t 3 * 4 \n").item() == 12
6262

6363
def test_multiline_with_parens(self) -> None:
64-
result = evaluate_expression(
65-
"""(
64+
result = evaluate_expression("""(
6665
1 + 2 +
6766
3
68-
)"""
69-
)
67+
)""")
7068
assert result.item() == 6
7169

7270
def test_multiline_list(self) -> None:
73-
result = evaluate_expression(
74-
"""[
71+
result = evaluate_expression("""[
7572
1,
7673
2,
7774
3
78-
]"""
79-
)
75+
]""")
8076
assert result.item() == [1, 2, 3]
8177

8278
def test_multiline_conditional(self) -> None:
83-
result = evaluate_expression(
84-
"""
79+
result = evaluate_expression("""
8580
1 if True else 2
86-
"""
87-
)
81+
""")
8882
assert result.item() == 1
8983

9084

test/openjd/expr/test_pickle.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
TypeCode,
3333
)
3434

35-
3635
# ── Group A: enums round-trip via variant name ───────────────────
3736

3837

test/openjd/expr/test_target_type_propagation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030
from openjd.expr import ExprType, SymbolTable, TypeCode, evaluate_expression
3131

32-
3332
STRING = ExprType("string")
3433
LIST_INT = ExprType("list[int]")
3534
INT_OR_STRING = ExprType("int | string")

test/openjd/model_v0/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import os
3030
import sys
3131

32-
3332
_VAR = "OPENJD_MODEL_V0_TEST_IMPORT"
3433
_DEFAULT = "root"
3534
_CHOICES = ("root", "v0")

test/openjd/model_v0/test_step_param_space_iter_with_chunks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
divide_int_list_into_noncontiguous_chunks,
2525
)
2626

27-
2827
PARAMETRIZE_CASES: tuple = (
2928
pytest.param(
3029
RangeListTaskParameterDefinition_2023_09(

0 commit comments

Comments
 (0)