diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 587f6ac..ec0cc25 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.12"] + python-version: ["3.9", "3.13"] steps: - uses: actions/checkout@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index d405da7..20e0afa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## Version 2.7.0 ## +Supported versions of Python have been updated (drop support for Python 3.8, add support for Python 3.13): + +* PlotPy < 2.7.0: Python 3.8, 3.9, 3.10, 3.11 and 3.12 +* PlotPy >= 2.7.0: Python 3.9, 3.10, 3.11, 3.12 and 3.13 + 💥 New features / Enhancements: * Added `AnnotatedPolygon` annotation to items diff --git a/doc/dev/platforms.rst b/doc/dev/platforms.rst index efee473..9f8b68f 100644 --- a/doc/dev/platforms.rst +++ b/doc/dev/platforms.rst @@ -7,8 +7,7 @@ The following sections describe the reference platforms for the project. .. note:: - The officially supported Python versions are 3.8, 3.9 and 3.10. - However, the project should work on any earlier Python 3 version. + The officially supported Python versions are 3.9, 3.10, 3.11, 3.12 and 3.13. 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. @@ -16,7 +15,9 @@ The following sections describe the reference platforms for the project. The project is currently tested on the following platforms: * Microsoft Windows 10 (64-bit) + * Microsoft Windows 11 (64-bit) * CentOS Stream 8.8 (64-bit) + * Ubuntu 22.04 LTS (64-bit) However, it should work on any other platform supported by its dependencies. diff --git a/doc/intro/motivation.rst b/doc/intro/motivation.rst index df1948a..e001729 100644 --- a/doc/intro/motivation.rst +++ b/doc/intro/motivation.rst @@ -13,7 +13,7 @@ From a developer point of view, PlotPy V2 is a major overhaul of PlotPy V1: all over the codebase .. note:: - PlotPy V2 is fully typed using Python 3.8+ type annotations. + PlotPy V2 is fully typed using Python type annotations. This means that you can use your IDE to get autocompletion and type checking (e.g. with VSCode, Visual Studio, etc.). This is a major improvement when you write code using PlotPy V2: diff --git a/doc/requirements.rst b/doc/requirements.rst index dbd0881..4bf3ee4 100644 --- a/doc/requirements.rst +++ b/doc/requirements.rst @@ -8,20 +8,20 @@ The :mod:`plotpy` package requires the following Python modules: - Version - Summary * - Python - - >=3.8, <4 + - >=3.9, <4 - Python programming language * - guidata - - >=3.4 + - >=3.7 - Automatic GUI generation for easy dataset editing and display * - PythonQwt - - >=0.12.1 + - >=0.14 - Qt plotting widgets for Python - * - NumPy - - >=1.17 - - Fundamental package for array computing in Python * - SciPy - - >=1.3 + - >=1.5 - Fundamental algorithms for scientific computing in Python + * - scikit-image + - >= 0.18 + - Image processing in Python * - Pillow - - Python Imaging Library (Fork) diff --git a/doc/update_requirements.py b/doc/update_requirements.py index dbfebb9..39324f2 100644 --- a/doc/update_requirements.py +++ b/doc/update_requirements.py @@ -15,5 +15,5 @@ if __name__ == "__main__": print("Updating requirements.rst file...", end=" ") - gen_module_req_rst(plotpy, ["Python>=3.8", "PyQt5>=5.11"]) + gen_module_req_rst(plotpy, ["Python>=3.9", "PyQt5>=5.11"]) print("done.") diff --git a/pyproject.toml b/pyproject.toml index 73ee18a..f4dfa79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,7 @@ # plotpy setup configuration file [build-system] -requires = [ - "setuptools", - "wheel", - "cython ~= 0.29.0", - "numpy >= 1.17; python_version == '3.8'", - "numpy >= 2.0.0; python_version > '3.8'", -] +requires = ["setuptools", "wheel", "cython ~= 0.29.0", "numpy >= 2.0.0"] build-backend = "setuptools.build_meta" [project] @@ -28,11 +22,11 @@ classifiers = [ "Operating System :: Microsoft :: Windows :: Windows 10", "Operating System :: Microsoft :: Windows :: Windows 11", "Operating System :: POSIX :: Linux", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Image Processing", "Topic :: Scientific/Engineering :: Human Machine Interfaces", @@ -42,12 +36,11 @@ classifiers = [ "Topic :: Software Development :: Widget Sets", "Topic :: Utilities", ] -requires-python = ">=3.8, <4" +requires-python = ">=3.9, <4" dependencies = [ - "guidata>=3.6.2", - "PythonQwt>=0.12.1", - "NumPy>=1.17", - "SciPy>=1.3", + "guidata>=3.7", + "PythonQwt>=0.14", + "SciPy>=1.5", "scikit-image >= 0.18", "Pillow", "tifffile", @@ -90,7 +83,7 @@ addopts = "plotpy" exclude = [".git", ".vscode", "build", "dist"] line-length = 88 # Same as Black. indent-width = 4 # Same as Black. -target-version = "py38" # Assume Python 3.8 +target-version = "py39" # Assume Python 3.9. [tool.ruff.lint] # all rules can be found here: https://beta.ruff.rs/docs/rules/ @@ -109,5 +102,5 @@ line-ending = "auto" # Like Black, automatically detect the appropr "doc/*" = ["E402"] [tool.cibuildwheel] -build = ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*"] +build = ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*"] skip = ["*-manylinux_i686", "*-musllinux*"] diff --git a/scripts/build-wheels.sh b/scripts/build-wheels.sh index 7fde36b..062eca5 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.8 or greater -function is_python_version_ge_38 { +# Accurately check if Python version is 3.9 or greater +function is_python_version_ge_39 { local pydir="$1" 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.8 - if [[ $(echo -e "3.8\n$version" | sort -V | head -n1) == "3.8" ]]; then - return 0 # True, version is >= 3.8 + # 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 fi fi - return 1 # False, version is < 3.8 + return 1 # False, version is < 3.9 } -# Compile wheels, only for CPython 3.8+ +# Compile wheels, only for CPython 3.9+ for PYDIR in /opt/python/*; do - if is_python_version_ge_38 "$PYDIR"; then + if is_python_version_ge_39 "$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.8+ +# Install packages and test, only for CPython 3.9+ for PYDIR in /opt/python/*; do - if is_python_version_ge_38 "$PYDIR"; then + if is_python_version_ge_39 "$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")