mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-15 09:44:46 +03:00
Drop support for Python 3.9 (#137)
This commit is contained in:
commit
956ee04f29
|
@ -27,6 +27,7 @@ python3 -m pip install --upgrade wheel
|
|||
python3 -m pip install coverage
|
||||
python3 -m pip install defusedxml
|
||||
python3 -m pip install ipython
|
||||
python3 -m pip install numpy
|
||||
python3 -m pip install olefile
|
||||
python3 -m pip install -U pytest
|
||||
python3 -m pip install -U pytest-cov
|
||||
|
@ -36,9 +37,6 @@ python3 -m pip install pyroma
|
|||
# fails on beta 3.14 and PyPy
|
||||
python3 -m pip install --only-binary=:all: pyarrow || true
|
||||
|
||||
|
||||
python3 -m pip install numpy
|
||||
|
||||
# PyQt6 doesn't support PyPy3
|
||||
if [[ $GHA_PYTHON_VERSION == 3.* ]]; then
|
||||
sudo apt-get -qq install libegl1 libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxkbcommon-x11-0
|
||||
|
|
|
@ -208,9 +208,10 @@ def test_exceptions() -> None:
|
|||
ImageCms.getProfileName(None) # type: ignore[arg-type]
|
||||
skip_missing()
|
||||
|
||||
# Python <= 3.9: "an integer is required (got type NoneType)"
|
||||
# Python > 3.9: "'NoneType' object cannot be interpreted as an integer"
|
||||
with pytest.raises(ImageCms.PyCMSError, match="integer"):
|
||||
with pytest.raises(
|
||||
ImageCms.PyCMSError,
|
||||
match="'NoneType' object cannot be interpreted as an integer",
|
||||
):
|
||||
ImageCms.isIntentSupported(SRGB, None, None) # type: ignore[arg-type]
|
||||
|
||||
|
||||
|
|
|
@ -19,13 +19,13 @@ These platforms are built and tested for every change.
|
|||
+==================================+============================+=====================+
|
||||
| Alpine | 3.12 | x86-64 |
|
||||
+----------------------------------+----------------------------+---------------------+
|
||||
| Amazon Linux 2 | 3.9 | x86-64 |
|
||||
| Amazon Linux 2 | 3.10 | x86-64 |
|
||||
+----------------------------------+----------------------------+---------------------+
|
||||
| Amazon Linux 2023 | 3.9 | x86-64 |
|
||||
| Amazon Linux 2023 | 3.11 | x86-64 |
|
||||
+----------------------------------+----------------------------+---------------------+
|
||||
| Arch | 3.13 | x86-64 |
|
||||
+----------------------------------+----------------------------+---------------------+
|
||||
| CentOS Stream 9 | 3.9 | x86-64 |
|
||||
| CentOS Stream 9 | 3.10 | x86-64 |
|
||||
+----------------------------------+----------------------------+---------------------+
|
||||
| CentOS Stream 10 | 3.12 | x86-64 |
|
||||
+----------------------------------+----------------------------+---------------------+
|
||||
|
@ -42,16 +42,16 @@ These platforms are built and tested for every change.
|
|||
+----------------------------------+----------------------------+---------------------+
|
||||
| Ubuntu Linux 22.04 LTS (Jammy) | 3.10 | x86-64 |
|
||||
+----------------------------------+----------------------------+---------------------+
|
||||
| Ubuntu Linux 24.04 LTS (Noble) | 3.10, 3.11, | x86-64 |
|
||||
| | 3.12, 3.13, 3.14, PyPy3 | |
|
||||
| Ubuntu Linux 24.04 LTS (Noble) | 3.10, 3.11, 3.12, 3.13, | x86-64 |
|
||||
| | 3.14, PyPy3 | |
|
||||
| +----------------------------+---------------------+
|
||||
| | 3.12 | arm64v8, ppc64le, |
|
||||
| | | s390x |
|
||||
+----------------------------------+----------------------------+---------------------+
|
||||
| Windows Server 2022 | 3.10 | x86 |
|
||||
| +----------------------------+---------------------+
|
||||
| | 3.11, 3.12, 3.13, | x86-64 |
|
||||
| | 3.14, PyPy3 | |
|
||||
| | 3.11, 3.12, 3.13, 3.14, | x86-64 |
|
||||
| | PyPy3 | |
|
||||
| +----------------------------+---------------------+
|
||||
| | 3.12 (MinGW) | x86-64 |
|
||||
+----------------------------------+----------------------------+---------------------+
|
||||
|
|
|
@ -185,7 +185,6 @@ lint.ignore = [
|
|||
"PT011", # pytest-raises-too-broad
|
||||
"PT012", # pytest-raises-with-multiple-statements
|
||||
"PT017", # pytest-assert-in-except
|
||||
"PYI026", # flake8-pyi: typing.TypeAlias added in Python 3.10
|
||||
"PYI034", # flake8-pyi: typing.Self added in Python 3.11
|
||||
"UP038", # pyupgrade: deprecated rule
|
||||
]
|
||||
|
|
|
@ -31,7 +31,7 @@ import os
|
|||
import subprocess
|
||||
from enum import IntEnum
|
||||
from functools import cached_property
|
||||
from typing import IO, Any, Literal, NamedTuple, cast
|
||||
from typing import Any, NamedTuple, cast
|
||||
|
||||
from . import (
|
||||
Image,
|
||||
|
@ -49,6 +49,8 @@ from ._util import DeferredError
|
|||
|
||||
TYPE_CHECKING = False
|
||||
if TYPE_CHECKING:
|
||||
from typing import IO, Literal
|
||||
|
||||
from . import _imaging
|
||||
from ._typing import Buffer
|
||||
|
||||
|
|
|
@ -33,22 +33,23 @@ from __future__ import annotations
|
|||
|
||||
import math
|
||||
import struct
|
||||
from collections.abc import Callable, Sequence
|
||||
from collections.abc import Sequence
|
||||
from typing import cast
|
||||
|
||||
from . import Image, ImageColor
|
||||
|
||||
# experimental access to the outline API
|
||||
Outline: Callable[[], Image.core._Outline] = Image.core.outline
|
||||
|
||||
TYPE_CHECKING = False
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import Callable
|
||||
from types import ModuleType
|
||||
from typing import Any, AnyStr
|
||||
|
||||
from . import ImageDraw2, ImageFont
|
||||
from ._typing import Coords
|
||||
|
||||
# experimental access to the outline API
|
||||
Outline: Callable[[], Image.core._Outline] = Image.core.outline
|
||||
|
||||
_Ink = float | tuple[int, ...] | str
|
||||
|
||||
"""
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import datetime
|
||||
import sys
|
||||
from typing import Literal, SupportsFloat, TypedDict
|
||||
from typing import Literal, SupportsFloat, TypeAlias, TypedDict
|
||||
|
||||
from ._typing import CapsuleType
|
||||
|
||||
littlecms_version: str | None
|
||||
|
||||
_Tuple3f = tuple[float, float, float]
|
||||
_Tuple2x3f = tuple[_Tuple3f, _Tuple3f]
|
||||
_Tuple3x3f = tuple[_Tuple3f, _Tuple3f, _Tuple3f]
|
||||
_Tuple3f: TypeAlias = tuple[float, float, float]
|
||||
_Tuple2x3f: TypeAlias = tuple[_Tuple3f, _Tuple3f]
|
||||
_Tuple3x3f: TypeAlias = tuple[_Tuple3f, _Tuple3f, _Tuple3f]
|
||||
|
||||
class _IccMeasurementCondition(TypedDict):
|
||||
observer: int
|
||||
|
|
Loading…
Reference in New Issue
Block a user