From 5ea7c1fc0d1914b63ea2db29e13da94385adf911 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 3 Dec 2025 08:39:17 +0100 Subject: [PATCH] Require Python>=3.11 per nep-0029 --- .github/workflows/ci_tests.yml | 2 +- .github/workflows/deploy.yml | 2 +- .readthedocs.yaml | 4 ++-- README.md | 6 +++--- petab/v2/core.py | 11 +++++++++-- pyproject.toml | 2 +- 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 5b5a9bd4..5d9f85b7 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: platform: [windows-latest, macos-latest, ubuntu-latest] - python-version: ["3.10", "3.14"] + python-version: ["3.11", "3.14"] runs-on: ${{ matrix.platform }} steps: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9aa2bbf6..47cdc51d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,7 +19,7 @@ jobs: - name: Set up python uses: actions/setup-python@v6 with: - python-version: 3.11 + python-version: 3.13 - name: Install dependencies / build sdist run: | diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 90c2fc8f..51f9841e 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -8,9 +8,9 @@ sphinx: fail_on_warning: false build: - os: "ubuntu-22.04" + os: "ubuntu-24.04" tools: - python: "3.10" + python: "3.12" python: install: diff --git a/README.md b/README.md index bf05c459..7888714e 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,13 @@ Documentation of the PEtab format in general is available at ## Installation -The PEtab library is available on [pypi](https://pypi.org/project/petab/) +The PEtab library is available on [PyPI](https://pypi.org/project/petab/) and the easiest way to install it is running pip3 install petab -It will require Python>=3.10 to run. (We are following the -[numpy Python support policy](https://numpy.org/neps/nep-0029-deprecation_policy.html)). +`petab` requires Python>=3.11. We are following +[NumPy's Python support policy](https://numpy.org/neps/nep-0029-deprecation_policy.html). Development versions of the PEtab library can be installed using diff --git a/petab/v2/core.py b/petab/v2/core.py index beadbc2e..9727b21d 100644 --- a/petab/v2/core.py +++ b/petab/v2/core.py @@ -14,7 +14,15 @@ from math import nan from numbers import Number from pathlib import Path -from typing import TYPE_CHECKING, Annotated, Any, Generic, TypeVar, get_args +from typing import ( + TYPE_CHECKING, + Annotated, + Any, + Generic, + Self, + TypeVar, + get_args, +) import numpy as np import pandas as pd @@ -31,7 +39,6 @@ field_validator, model_validator, ) -from typing_extensions import Self from .._utils import _generate_path from ..v1 import ( diff --git a/pyproject.toml b/pyproject.toml index 1f3dcb51..eb5425d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta" name = "petab" dynamic = ["version", "readme"] description = "Parameter estimation tabular data" -requires-python = ">=3.10" +requires-python = ">=3.11" dependencies = [ "numpy>=1.15.1", "pandas>=1.2.0",