From 13f626c2fba7cd34377e2da40b1843dab2c81044 Mon Sep 17 00:00:00 2001 From: Jericho Tolentino <68654047+jericht@users.noreply.github.com> Date: Thu, 2 Jul 2026 23:48:52 +0000 Subject: [PATCH 1/2] chore(deps): upgrade mypy and pytest with Python 3.9 version markers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upgrade deps per dependabot PRs: - mypy: 1.19.* for Python 3.9, 2.1.* for Python >=3.10 - pytest: 8.4.* for Python 3.9, 9.1.* for Python >=3.10 mypy 2.x and pytest 9.x both dropped Python 3.9 support. Use environment markers so Python 3.9 CI stays on the last compatible versions while 3.10+ gets the latest. Also remove python_version = 3.9 from [tool.mypy] so mypy infers the target from the running Python — required because mypy 2.x dropped support for targeting 3.9. Signed-off-by: Jericho Tolentino <68654047+jericht@users.noreply.github.com> --- pyproject.toml | 1 - requirements-testing.txt | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 802f496a..5b49c1fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,7 +88,6 @@ disallow_incomplete_defs = false disallow_untyped_calls = false show_error_context = true strict_equality = false -python_version = 3.9 warn_redundant_casts = true warn_unused_configs = true warn_unused_ignores = false diff --git a/requirements-testing.txt b/requirements-testing.txt index 483cb990..8ce61eaa 100644 --- a/requirements-testing.txt +++ b/requirements-testing.txt @@ -1,10 +1,12 @@ coverage[toml] == 7.* coverage-conditional-plugin == 0.9.* -pytest == 8.4.* +pytest == 8.4.*; python_version == "3.9" +pytest == 9.1.*; python_version >= "3.10" pytest-cov == 7.1.* pytest-timeout == 2.4.* pytest-xdist == 3.8.* black == 25.* ruff == 0.15.* psutil >= 5.9,< 7.3 -mypy == 1.19.* +mypy == 1.19.*; python_version == "3.9" +mypy == 2.1.*; python_version >= "3.10" From fae54960e43b4ef1831311f091b934aeede29b54 Mon Sep 17 00:00:00 2001 From: Jericho Tolentino <68654047+jericht@users.noreply.github.com> Date: Thu, 2 Jul 2026 23:53:33 +0000 Subject: [PATCH 2/2] fix(test): add None check for logger.extra to satisfy mypy 2.x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mypy 2.x is stricter about Mapping | None — add an explicit assertion before accessing session._logger.extra. Signed-off-by: Jericho Tolentino <68654047+jericht@users.noreply.github.com> --- test/openjd/sessions_v0/test_session.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/openjd/sessions_v0/test_session.py b/test/openjd/sessions_v0/test_session.py index e141daff..f3420a92 100644 --- a/test/openjd/sessions_v0/test_session.py +++ b/test/openjd/sessions_v0/test_session.py @@ -130,6 +130,7 @@ def test_initiaize_basic(self) -> None: assert session._job_parameter_values == job_params assert session._job_parameter_values is not job_params assert isinstance(session._logger, LoggerAdapter) + assert session._logger.extra is not None assert "session_id" in session._logger.extra assert session._logger.extra["session_id"] == session_id assert session._log_filter in LOG.filters