From a60e724f17b5409601a9f7634947e8a2548a5d8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9rian=20Rey?= Date: Wed, 23 Sep 2026 15:51:59 +0200 Subject: [PATCH 1/3] Fix np.ndarray annotations when numpy is missing on python<3.14 --- src/torchjd/_linalg/_dual_cone.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/torchjd/_linalg/_dual_cone.py b/src/torchjd/_linalg/_dual_cone.py index 43fe59fb..7dd32482 100644 --- a/src/torchjd/_linalg/_dual_cone.py +++ b/src/torchjd/_linalg/_dual_cone.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import contextlib from abc import ABC, abstractmethod From 82af484abb9e9eaea354cc4fd85b991cc0058c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9rian=20Rey?= Date: Wed, 23 Sep 2026 15:54:47 +0200 Subject: [PATCH 2/3] Add test config for python<3.14 and none options --- .github/workflows/checks.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 66f9800a..88207e13 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -36,6 +36,10 @@ jobs: - dtype: float64 # Installation options variations - options: 'none' + # No options on Python < 3.14, where annotations are evaluated eagerly, to catch + # annotations referencing optional dependencies. + - python-version: '3.10' + options: 'none' # Lower-bounds of all dependencies and Python version. - python-version: '3.10.0' extra_groups: 'lower_bounds' From 8733626afcac5460adffe18a9be24c90336ca56c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9rian=20Rey?= Date: Wed, 23 Sep 2026 15:57:42 +0200 Subject: [PATCH 3/3] Add changelog entry --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fccba32f..7615e3a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ changelog does not include internal changes that do not affect the user. ## [Unreleased] +### Fixed + +- Fixed a bug with type annotations making it impossible to use TorchJD without any optional + dependencies on Python versions older than 3.14. + ## [0.17.0] - 2026-06-24 ### Added