From 50c222a3b9c3ad93fbd781073031a11f7266cf40 Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Fri, 8 Aug 2025 09:45:29 +0200 Subject: [PATCH 1/2] CI: test on python 3.8, too --- .github/workflows/pip.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pip.yml b/.github/workflows/pip.yml index f1fc58c..4342a71 100644 --- a/.github/workflows/pip.yml +++ b/.github/workflows/pip.yml @@ -14,7 +14,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ['3.11', '3.12', '3.13'] + python-version: ['3.8', '3.11', '3.12', '3.13'] numpy: ['"numpy<2.0"', "numpy"] os: [ubuntu-latest] pytest: [pytest] From 5f6e7dfc21335db5581985667e2c5a79599e83e4 Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Fri, 8 Aug 2025 09:48:28 +0200 Subject: [PATCH 2/2] BUG: use Union in a type annotation Pipes are python 3.9 syntax. While it's nice (type annotation *is* verbose and ugly), this is the only place which is not python 3.8 compatible, so it's not worth bumping the min version just for this single line. --- scipy_doctest/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scipy_doctest/util.py b/scipy_doctest/util.py index 8baf064..85a35c8 100644 --- a/scipy_doctest/util.py +++ b/scipy_doctest/util.py @@ -10,7 +10,7 @@ import inspect from contextlib import contextmanager -from typing import Sequence +from typing import Sequence, Union from importlib.metadata import version as get_version, PackageNotFoundError from packaging.requirements import Requirement @@ -259,7 +259,7 @@ def get_public_objects(module, skiplist=None): return (items, names), failures -def is_req_satisfied(req_strs: str | Sequence[str]) -> bool: +def is_req_satisfied(req_strs: Union[str, Sequence[str]]) -> bool: """ Check if all PEP 508-compliant requirement(s) are satisfied or not. """ req_strs = [req_strs] if isinstance(req_strs, str) else req_strs