diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index ed3c583..0fde6ae 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -12,7 +12,7 @@ PythonQwt and guidata. ### Technology Stack -- **Python**: 3.9+ (`from __future__ import annotations`) +- **Python**: 3.10+ (`from __future__ import annotations`) - **Core**: NumPy, SciPy, scikit-image - **GUI**: Qt via QtPy, guidata, PythonQwt - **Build**: Some features rely on Cython extensions diff --git a/.github/workflows/test_pyqt5.yml b/.github/workflows/test_pyqt5.yml index 8d30ef1..8edb2bc 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.13", "3.14"] + python-version: ["3.10", "3.13", "3.14"] steps: - uses: actions/checkout@v7 diff --git a/doc/dev/platforms.rst b/doc/dev/platforms.rst index 621c19e..ee11f09 100644 --- a/doc/dev/platforms.rst +++ b/doc/dev/platforms.rst @@ -7,7 +7,7 @@ The following sections describe the reference platforms for the project. .. note:: - The officially supported Python versions are 3.9, 3.10, 3.11, 3.12 and 3.13. + The officially supported Python versions are 3.10, 3.11, 3.12, 3.13 and 3.14. The officially supported Qt binding is PyQt5. However, efforts have been made and will continue to be made to support PyQt6 and PySide6 as well. diff --git a/doc/release_notes/release_2.11.md b/doc/release_notes/release_2.11.md index dacde10..a2aa363 100644 --- a/doc/release_notes/release_2.11.md +++ b/doc/release_notes/release_2.11.md @@ -1,5 +1,9 @@ # Version 2.11 # +## Unreleased ## + +* Python 3.10 or later is now required, and wheels are no longer built for Python 3.9. Python 3.9 users must keep an earlier compatible release. + ## PlotPy Version 2.11.2 ## 🛠️ Bug fixes: diff --git a/doc/requirements.rst b/doc/requirements.rst index 4026339..bf7b24c 100644 --- a/doc/requirements.rst +++ b/doc/requirements.rst @@ -8,7 +8,7 @@ The `PlotPy` package requires the following Python modules: - Version - Summary * - Python - - >=3.9, <4 + - >=3.10, <4 - Python programming language * - guidata - >= 3.14.1 diff --git a/pyproject.toml b/pyproject.toml index cc5bb73..f21399f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,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", @@ -36,7 +35,7 @@ classifiers = [ "Topic :: Software Development :: Widget Sets", "Topic :: Utilities", ] -requires-python = ">=3.9, <4" +requires-python = ">=3.10, <4" dependencies = [ "guidata >= 3.14.1", "PythonQwt >= 0.16", @@ -86,7 +85,7 @@ testpaths = ["plotpy"] exclude = [".git", ".vscode", "build", "dist","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/ @@ -117,5 +116,5 @@ line-ending = "auto" # Like Black, automatically detect the appropr convention = "google" [tool.cibuildwheel] -build = ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*", "cp314-*"] +build = ["cp310-*", "cp311-*", "cp312-*", "cp313-*", "cp314-*"] skip = ["*-manylinux_i686", "*-musllinux*"] diff --git a/scripts/build-wheels.sh b/scripts/build-wheels.sh index 062eca5..92ea53b 100644 --- a/scripts/build-wheels.sh +++ b/scripts/build-wheels.sh @@ -4,22 +4,22 @@ set -e -u -x ARCH=$(uname -m) export PLAT=manylinux_2_24_$ARCH -# Accurately check if Python version is 3.9 or greater -function is_python_version_ge_39 { +# Accurately check if Python version is 3.10 or greater +function is_python_version_ge_310 { local pydir="$1" - if [[ $pydir =~ cp([0-9]+)([0-9]+)-cp ]]; then + if [[ $pydir =~ cp([0-9])([0-9]+)-cp ]]; then local version="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}" - # Use sort with version sort flag to compare version against 3.9 - if [[ $(echo -e "3.9\n$version" | sort -V | head -n1) == "3.9" ]]; then - return 0 # True, version is >= 3.9 + # Use sort with version sort flag to compare version against 3.10 + if [[ $(echo -e "3.10\n$version" | sort -V | head -n1) == "3.10" ]]; then + return 0 # True, version is >= 3.10 fi fi - return 1 # False, version is < 3.9 + return 1 # False, version is < 3.10 } -# Compile wheels, only for CPython 3.9+ +# Compile wheels, only for CPython 3.10+ for PYDIR in /opt/python/*; do - if is_python_version_ge_39 "$PYDIR"; then + if is_python_version_ge_310 "$PYDIR"; then PYBIN="$PYDIR/bin" "${PYBIN}/pip" install -r /io/requirements.txt "${PYBIN}/pip" wheel /io/ --no-deps -w wheelhouse/ @@ -33,9 +33,9 @@ for wheel in wheelhouse/*.whl; do fi done -# Install packages and test, only for CPython 3.9+ +# Install packages and test, only for CPython 3.10+ for PYDIR in /opt/python/*; do - if is_python_version_ge_39 "$PYDIR"; then + if is_python_version_ge_310 "$PYDIR"; then PYBIN="$PYDIR/bin" "${PYBIN}/pip" install plotpy --no-index -f /io/wheelhouse (cd "$HOME"; INSTDIR=$("${PYBIN}/python" -c "import plotpy, os.path as osp; print(osp.dirname(plotpy.__file__))"); export QT_QPA_PLATFORM=offscreen; "${PYBIN}/pytest" "$INSTDIR")