diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index c71ca45..ac0e330 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -50,7 +50,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest] - python-version: [3.9, "3.10", "3.11", "3.12", "3.13", "3.14"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] openslide: [system, wheel] include: - os: ubuntu-latest @@ -165,7 +165,7 @@ jobs: shell: bash strategy: matrix: - python-version: [3.9, "3.10", "3.11", "3.12", "3.13", "3.14"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] openslide: [zip, wheel] steps: - name: Check out repo diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b18c213..c3b7df6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: hooks: - id: pyupgrade name: Modernize python code - args: ["--py39-plus"] + args: ["--py310-plus"] - repo: https://github.com/PyCQA/isort rev: 7.0.0 diff --git a/README.md b/README.md index 50f426d..22f7f76 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ OpenSlide can read virtual slides in several formats: ## Requirements -* Python ≥ 3.9 +* Python ≥ 3.10 * OpenSlide ≥ 3.4.0 * Pillow diff --git a/openslide/lowlevel.py b/openslide/lowlevel.py index 6608033..f430482 100644 --- a/openslide/lowlevel.py +++ b/openslide/lowlevel.py @@ -31,6 +31,7 @@ from __future__ import annotations +from collections.abc import Callable from ctypes import ( CDLL, POINTER, @@ -49,7 +50,7 @@ from itertools import count import os import platform -from typing import TYPE_CHECKING, Any, Callable, Protocol, TypeVar, cast +from typing import TYPE_CHECKING, Any, Protocol, TypeVar, cast from PIL import Image diff --git a/pyproject.toml b/pyproject.toml index d65a584..65ae68c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,6 @@ classifiers = [ "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -27,7 +26,7 @@ classifiers = [ "Topic :: Scientific/Engineering :: Bio-Informatics", "Typing :: Typed", ] -requires-python = ">= 3.9" +requires-python = ">= 3.10" dependencies = ["Pillow"] dynamic = ["version"] @@ -52,7 +51,7 @@ openslide = ["py.typed", "*.pyi"] [tool.black] skip-string-normalization = true -target-version = ["py39", "py310", "py311", "py312", "py313", "py314"] +target-version = ["py310", "py311", "py312", "py313", "py314"] # Ref: https://github.com/codespell-project/codespell#using-a-config-file [tool.codespell]