Skip to content

Commit 530512f

Browse files
authored
Merge branch 'main' into type-hints-replace-io.BytesIO
2 parents d49d2d1 + 4a4b90c commit 530512f

118 files changed

Lines changed: 1894 additions & 1814 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci/requirements-cibw.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cibuildwheel==2.16.2
1+
cibuildwheel==2.16.5

.github/workflows/macos-install.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22

33
set -e
44

5-
brew install libtiff libjpeg openjpeg libimagequant webp little-cms2 freetype libraqm
5+
brew install \
6+
freetype \
7+
ghostscript \
8+
libimagequant \
9+
libjpeg \
10+
libraqm \
11+
libtiff \
12+
little-cms2 \
13+
openjpeg \
14+
webp
615
export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig"
716

817
# TODO Update condition when cffi supports 3.13

.github/workflows/test-cygwin.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
uses: actions/checkout@v4
4848

4949
- name: Install Cygwin
50-
uses: cygwin/cygwin-install-action@v4
50+
uses: egor-tensin/setup-cygwin@v4
5151
with:
5252
platform: x86_64
5353
packages: >
@@ -69,6 +69,7 @@ jobs:
6969
make
7070
netpbm
7171
perl
72+
python39=3.9.16-1
7273
python3${{ matrix.python-minor-version }}-cffi
7374
python3${{ matrix.python-minor-version }}-cython
7475
python3${{ matrix.python-minor-version }}-devel
@@ -86,7 +87,7 @@ jobs:
8687

8788
- name: Select Python version
8889
run: |
89-
ln -sf c:/cygwin/bin/python3.${{ matrix.python-minor-version }} c:/cygwin/bin/python3
90+
ln -sf c:/tools/cygwin/bin/python3.${{ matrix.python-minor-version }} c:/tools/cygwin/bin/python3
9091
9192
- name: Get latest NumPy version
9293
id: latest-numpy

.github/workflows/test.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
fail-fast: false
3737
matrix:
3838
os: [
39-
"macos-latest",
39+
"macos-14",
4040
"ubuntu-latest",
4141
]
4242
python-version: [
@@ -50,11 +50,21 @@ jobs:
5050
"3.8",
5151
]
5252
include:
53-
- python-version: "3.9"
53+
- python-version: "3.11"
5454
PYTHONOPTIMIZE: 1
5555
REVERSE: "--reverse"
56-
- python-version: "3.8"
56+
- python-version: "3.10"
5757
PYTHONOPTIMIZE: 2
58+
# M1 only available for 3.10+
59+
- os: "macos-latest"
60+
python-version: "3.9"
61+
- os: "macos-latest"
62+
python-version: "3.8"
63+
exclude:
64+
- os: "macos-14"
65+
python-version: "3.9"
66+
- os: "macos-14"
67+
python-version: "3.8"
5868

5969
runs-on: ${{ matrix.os }}
6070
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
@@ -141,7 +151,7 @@ jobs:
141151
- name: Upload coverage
142152
uses: codecov/codecov-action@v3
143153
with:
144-
flags: ${{ matrix.os == 'macos-latest' && 'GHA_macOS' || 'GHA_Ubuntu' }}
154+
flags: ${{ matrix.os == 'ubuntu-latest' && 'GHA_Ubuntu' || 'GHA_macOS' }}
145155
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
146156
gcov: true
147157

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ repos:
3232
rev: v4.5.0
3333
hooks:
3434
- id: check-executables-have-shebangs
35+
- id: check-shebang-scripts-are-executable
3536
- id: check-merge-conflict
3637
- id: check-json
3738
- id: check-toml

Tests/bench_cffi_access.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
# Not running this test by default. No DOS against CI.
1010

1111

12-
def iterate_get(size, access):
12+
def iterate_get(size, access) -> None:
1313
(w, h) = size
1414
for x in range(w):
1515
for y in range(h):
1616
access[(x, y)]
1717

1818

19-
def iterate_set(size, access):
19+
def iterate_set(size, access) -> None:
2020
(w, h) = size
2121
for x in range(w):
2222
for y in range(h):
2323
access[(x, y)] = (x % 256, y % 256, 0)
2424

2525

26-
def timer(func, label, *args):
26+
def timer(func, label, *args) -> None:
2727
iterations = 5000
2828
starttime = time.time()
2929
for x in range(iterations):
@@ -38,7 +38,7 @@ def timer(func, label, *args):
3838
)
3939

4040

41-
def test_direct():
41+
def test_direct() -> None:
4242
im = hopper()
4343
im.load()
4444
# im = Image.new("RGB", (2000, 2000), (1, 3, 2))

Tests/check_fli_oob.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python3
21
from __future__ import annotations
32

43
from PIL import Image

Tests/check_jp2_overflow.py

100755100644
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python3
2-
31
# Reproductions/tests for OOB read errors in FliDecode.c
42

53
# When run in python, all of these images should fail for

Tests/images/create_eps.gnuplot

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/gnuplot
2-
31
#This is the script that was used to create our sample EPS files
42
#We used the following version of the gnuplot program
53
#G N U P L O T

Tests/oss-fuzz/fuzz_pillow.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/python3
2-
31
# Copyright 2020 Google LLC
42
#
53
# Licensed under the Apache License, Version 2.0 (the "License");

0 commit comments

Comments
 (0)