diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index e57d864..be340e4 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -6,7 +6,7 @@ ### Technology Stack -- **Python**: 3.9+ (`from __future__ import annotations`) +- **Python**: 3.10+ (`from __future__ import annotations`) - **Core**: NumPy (≥1.22), h5py (≥3.6), QtPy (≥1.9) - **GUI**: Qt via QtPy (PyQt5/PyQt6/PySide6) - **Testing**: pytest diff --git a/.github/workflows/test_pyqt5.yml b/.github/workflows/test_pyqt5.yml index 63d41c1..c80132e 100644 --- a/.github/workflows/test_pyqt5.yml +++ b/.github/workflows/test_pyqt5.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.11", "3.14"] + python-version: ["3.10", "3.11", "3.14"] steps: - uses: actions/checkout@v7 diff --git a/.github/workflows/test_pyqt6.yml b/.github/workflows/test_pyqt6.yml index a556349..bf7cebf 100644 --- a/.github/workflows/test_pyqt6.yml +++ b/.github/workflows/test_pyqt6.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.11", "3.14"] + python-version: ["3.10", "3.11", "3.14"] steps: - uses: actions/checkout@v7 diff --git a/.github/workflows/test_pyside6.yml b/.github/workflows/test_pyside6.yml index e2a2085..0872748 100644 --- a/.github/workflows/test_pyside6.yml +++ b/.github/workflows/test_pyside6.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.11", "3.14"] + python-version: ["3.10", "3.11", "3.14"] steps: - uses: actions/checkout@v7 @@ -36,7 +36,8 @@ jobs: /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX python -m pip install --upgrade pip python -m pip install ruff pytest - pip install PySide6 + # PySide6 6.12.0 drops a reference to None on each void call: fatal before Python 3.12 + pip install "PySide6!=6.12.0; python_version < '3.12'" "PySide6; python_version >= '3.12'" pip install . - name: Lint with Ruff run: ruff check --output-format=github guidata diff --git a/doc/release_notes/release_3.16.md b/doc/release_notes/release_3.16.md index 86dac3e..80da0de 100644 --- a/doc/release_notes/release_3.16.md +++ b/doc/release_notes/release_3.16.md @@ -1,5 +1,9 @@ # Version 3.16 # +## Unreleased ## + +* Python 3.10 or later is now required. Python 3.9 users must keep an earlier compatible release. + ## guidata Version 3.16.0 ## ✨ New features: diff --git a/doc/requirements.rst b/doc/requirements.rst index c555a69..495e080 100644 --- a/doc/requirements.rst +++ b/doc/requirements.rst @@ -8,7 +8,7 @@ The `guidata` package requires the following Python modules: - Version - Summary * - Python - - >=3.9, <4 + - >=3.10, <4 - Python programming language * - h5py - >= 3.6 diff --git a/guidata/widgets/arrayeditor/arrayhandler.py b/guidata/widgets/arrayeditor/arrayhandler.py index 70af1ba..5af771c 100644 --- a/guidata/widgets/arrayeditor/arrayhandler.py +++ b/guidata/widgets/arrayeditor/arrayhandler.py @@ -21,15 +21,11 @@ from __future__ import annotations import copy -from typing import Any, Generic, TypeVar, Union, cast +from typing import Any, Generic, TypeVar, cast import numpy as np -# TODO: (When Python 3.8-3.9 support is dropped) Use `np.ndarray | np.ma.MaskedArray` -# instead of `Union[np.ndarray, np.ma.MaskedArray]` -AnySupportedArray = TypeVar( - "AnySupportedArray", bound=Union[np.ndarray, np.ma.MaskedArray] -) +AnySupportedArray = TypeVar("AnySupportedArray", bound=np.ndarray | np.ma.MaskedArray) AnyArrayHandler = TypeVar("AnyArrayHandler", bound="BaseArrayHandler") diff --git a/pyproject.toml b/pyproject.toml index 0b593a7..ef12592 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,6 @@ classifiers = [ "Operating System :: Microsoft :: Windows :: Windows 10", "Operating System :: Microsoft :: Windows :: Windows 11", "Operating System :: POSIX :: Linux", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -37,7 +36,7 @@ classifiers = [ "Topic :: Software Development :: Widget Sets", "Topic :: Utilities", ] -requires-python = ">=3.9, <4" +requires-python = ">=3.10, <4" dependencies = ["h5py >= 3.6", "NumPy >= 1.22", "QtPy >= 1.9", "requests", "tomli; python_version < '3.11'"] dynamic = ["version"] @@ -88,7 +87,7 @@ addopts = "guidata --import-mode=importlib" exclude = [".git", ".vscode", "build", "dist", "guidata/external","venv*",".venv*"] line-length = 88 # Same as Black. indent-width = 4 # Same as Black. -target-version = "py39" # Assume Python 3.9. +target-version = "py310" # Assume Python 3.10. [tool.ruff.lint] # all rules can be found here: https://beta.ruff.rs/docs/rules/