Skip to content

Commit a7c52fe

Browse files
committed
Drop support for Python 3.10
1 parent c64a82f commit a7c52fe

26 files changed

Lines changed: 54 additions & 54 deletions

.github/compare-dist-sizes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"""
1111

1212
# /// script
13-
# requires-python = ">=3.10"
13+
# requires-python = ">=3.11"
1414
# dependencies = [
1515
# "humanize",
1616
# "prettytable",

.github/generate-sbom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def upstream_diff_b64(
5959

6060
def generate(version: str) -> dict:
6161
serial = str(uuid.uuid4())
62-
now = dt.datetime.now(dt.timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
62+
now = dt.datetime.now(dt.UTC).strftime("%Y-%m-%dT%H:%M:%SZ")
6363
purl = f"pkg:pypi/pillow@{version}"
6464
root = Path(__file__).parent.parent
6565
thirdparty = root / "src" / "thirdparty"

.github/workflows/test-docker.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ jobs:
4747
fedora-43-amd64,
4848
fedora-44-amd64,
4949
gentoo,
50-
ubuntu-22.04-jammy-amd64,
5150
ubuntu-24.04-noble-amd64,
5251
ubuntu-26.04-resolute-amd64,
5352
]

.github/workflows/test-windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ jobs:
3131
strategy:
3232
fail-fast: false
3333
matrix:
34-
python-version: ["pypy3.11", "3.11", "3.12", "3.13", "3.14", "3.15"]
34+
python-version: ["pypy3.11", "3.12", "3.13", "3.14", "3.15"]
3535
architecture: ["x64"]
3636
os: ["windows-latest"]
3737
include:
3838
# Test the oldest Python on 32-bit
39-
- { python-version: "3.10", architecture: "x86", os: "windows-2022" }
39+
- { python-version: "3.11", architecture: "x86", os: "windows-2022" }
4040

4141
timeout-minutes: 45
4242

.github/workflows/test.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,14 @@ jobs:
4545
"3.13",
4646
"3.12",
4747
"3.11",
48-
"3.10",
4948
]
5049
include:
51-
- { python-version: "3.12", PYTHONOPTIMIZE: 1, REVERSE: "--reverse" }
52-
- { python-version: "3.11", PYTHONOPTIMIZE: 2 }
50+
- { python-version: "3.13", PYTHONOPTIMIZE: 1, REVERSE: "--reverse" }
51+
- { python-version: "3.12", PYTHONOPTIMIZE: 2 }
5352
# Intel
54-
- { os: "macos-26-intel", python-version: "3.10" }
53+
- { os: "macos-26-intel", python-version: "3.11" }
5554
exclude:
56-
- { os: "macos-latest", python-version: "3.10" }
55+
- { os: "macos-latest", python-version: "3.11" }
5756

5857
runs-on: ${{ matrix.os }}
5958
name: ${{ matrix.os }} Python ${{ matrix.python-version }}

.github/workflows/wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
platform: macos
8282
os: macos-26-intel
8383
cibw_arch: x86_64
84-
build: "cp3{10,11}*"
84+
build: "cp311*"
8585
macosx_deployment_target: "10.10"
8686
- name: "macOS 10.13 x86_64"
8787
platform: macos

Tests/test_bmp_reference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test_questionable() -> None:
5656
im.load()
5757
if os.path.basename(f) not in supported:
5858
print(f"Please add {f} to the partially supported bmp specs.")
59-
except Exception: # noqa: PERF203
59+
except Exception:
6060
if os.path.basename(f) in supported:
6161
raise
6262

@@ -106,7 +106,7 @@ def get_compare(f: str) -> str:
106106

107107
assert_image_similar(im_converted, compare_converted, 5)
108108

109-
except Exception as msg: # noqa: PERF203
109+
except Exception as msg:
110110
# there are three here that are unsupported:
111111
unsupported = (
112112
os.path.join(base, "g", "rgb32bf.bmp"),

Tests/test_file_avif.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ def test_svt_optimizations(self, tmp_path: Path) -> None:
603603
@skip_unless_feature("avif")
604604
class TestAvifAnimation:
605605
@contextmanager
606-
def star_frames(self) -> Generator[list[Image.Image], None, None]:
606+
def star_frames(self) -> Generator[list[Image.Image]]:
607607
with Image.open("Tests/images/avif/star.png") as f:
608608
yield [f, f.rotate(90), f.rotate(180), f.rotate(270)]
609609

@@ -676,7 +676,7 @@ def check(temp_file: Path) -> None:
676676
# Test appending using a generator
677677
def imGenerator(
678678
ims: list[Image.Image],
679-
) -> Generator[Image.Image, None, None]:
679+
) -> Generator[Image.Image]:
680680
yield from ims
681681

682682
temp_file2 = tmp_path / "temp_generator.avif"

Tests/test_file_gif.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ def test_append_images(tmp_path: Path) -> None:
11911191
assert reread.n_frames == 3
11921192

11931193
# Tests appending using a generator
1194-
def im_generator(ims: list[Image.Image]) -> Generator[Image.Image, None, None]:
1194+
def im_generator(ims: list[Image.Image]) -> Generator[Image.Image]:
11951195
yield from ims
11961196

11971197
im.save(out, save_all=True, append_images=im_generator(ims))

Tests/test_file_jpeg2k.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434

3535
@pytest.fixture
36-
def card() -> Generator[ImageFile.ImageFile, None, None]:
36+
def card() -> Generator[ImageFile.ImageFile]:
3737
with Image.open("Tests/images/test-card.png") as im:
3838
im.load()
3939
try:

0 commit comments

Comments
 (0)