Skip to content

Commit 9ec3c03

Browse files
authored
Merge branch 'main' into imaging-cleanup
2 parents d02907f + 7e6e08e commit 9ec3c03

35 files changed

Lines changed: 318 additions & 217 deletions

.appveyor.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ install:
3434
- xcopy /S /Y c:\test-images-main\* c:\pillow\tests\images
3535
- curl -fsSL -o nasm-win64.zip https://raw.githubusercontent.com/python-pillow/pillow-depends/main/nasm-2.16.03-win64.zip
3636
- 7z x nasm-win64.zip -oc:\
37-
- choco install ghostscript --version=10.3.1
38-
- path c:\nasm-2.16.03;C:\Program Files\gs\gs10.03.1\bin;%PATH%
37+
- choco install ghostscript --version=10.4.0
38+
- path c:\nasm-2.16.03;C:\Program Files\gs\gs10.04.0\bin;%PATH%
3939
- cd c:\pillow\winbuild\
4040
- ps: |
4141
c:\python39\python.exe c:\pillow\winbuild\build_prepare.py -v --depends=C:\pillow-depends\
@@ -53,9 +53,8 @@ test_script:
5353
- cd c:\pillow
5454
- '%PYTHON%\%EXECUTABLE% -m pip install pytest pytest-cov pytest-timeout defusedxml ipython numpy olefile pyroma'
5555
- c:\"Program Files (x86)"\"Windows Kits"\10\Debuggers\x86\gflags.exe /p /enable %PYTHON%\%EXECUTABLE%
56-
- '%PYTHON%\%EXECUTABLE% -c "from PIL import Image"'
57-
- '%PYTHON%\%EXECUTABLE% -m pytest -vx --cov PIL --cov Tests --cov-report term --cov-report xml Tests'
58-
#- '%PYTHON%\%EXECUTABLE% test-installed.py -v -s %TEST_OPTIONS%' TODO TEST_OPTIONS with pytest?
56+
- path %PYTHON%;%PATH%
57+
- .ci\test.cmd
5958

6059
after_test:
6160
- curl -Os https://uploader.codecov.io/latest/windows/codecov.exe

.ci/requirements-cibw.txt

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

.ci/test.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
python.exe -c "from PIL import Image"
2+
IF ERRORLEVEL 1 EXIT /B
3+
python.exe -bb -m pytest -v -x -W always --cov PIL --cov Tests --cov-report term --cov-report xml Tests

.ci/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ set -e
44

55
python3 -c "from PIL import Image"
66

7-
python3 -bb -m pytest -v -x -W always --cov PIL --cov Tests --cov-report term Tests $REVERSE
7+
python3 -bb -m pytest -v -x -W always --cov PIL --cov Tests --cov-report term --cov-report xml Tests $REVERSE

.github/workflows/cifuzz.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ concurrency:
2424

2525
jobs:
2626
Fuzzing:
27-
# Disabled until google/oss-fuzz#11419 upgrades Python to 3.9+
28-
if: false
2927
runs-on: ubuntu-latest
3028
steps:
3129
- name: Build Fuzzers

.github/workflows/test-mingw.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ jobs:
8080
- name: Test Pillow
8181
run: |
8282
python3 selftest.py --installed
83-
python3 -c "from PIL import Image"
84-
python3 -m pytest -vx --cov PIL --cov Tests --cov-report term --cov-report xml Tests
83+
.ci/test.sh
8584
8685
- name: Upload coverage
8786
uses: codecov/codecov-action@v4

.github/workflows/test-windows.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ jobs:
8686
choco install nasm --no-progress
8787
echo "C:\Program Files\NASM" >> $env:GITHUB_PATH
8888
89-
choco install ghostscript --version=10.3.1 --no-progress
90-
echo "C:\Program Files\gs\gs10.03.1\bin" >> $env:GITHUB_PATH
89+
choco install ghostscript --version=10.4.0 --no-progress
90+
echo "C:\Program Files\gs\gs10.04.0\bin" >> $env:GITHUB_PATH
9191
9292
# Install extra test images
9393
xcopy /S /Y Tests\test-images\* Tests\images
@@ -190,8 +190,8 @@ jobs:
190190
191191
- name: Test Pillow
192192
run: |
193-
path %GITHUB_WORKSPACE%\\winbuild\\build\\bin;%PATH%
194-
python.exe -m pytest -vx -W always --cov PIL --cov Tests --cov-report term --cov-report xml Tests
193+
path %GITHUB_WORKSPACE%\winbuild\build\bin;%PATH%
194+
.ci\test.cmd
195195
shell: cmd
196196

197197
- name: Prepare to upload errors

.github/workflows/wheels-dependencies.sh

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,9 @@ ARCHIVE_SDIR=pillow-depends-main
1616

1717
# Package versions for fresh source builds
1818
FREETYPE_VERSION=2.13.2
19-
if [[ "$MB_ML_VER" != 2014 ]]; then
20-
HARFBUZZ_VERSION=9.0.0
21-
else
22-
HARFBUZZ_VERSION=8.5.0
23-
fi
19+
HARFBUZZ_VERSION=10.0.1
2420
LIBPNG_VERSION=1.6.44
25-
JPEGTURBO_VERSION=3.0.3
21+
JPEGTURBO_VERSION=3.0.4
2622
OPENJPEG_VERSION=2.5.2
2723
XZ_VERSION=5.6.2
2824
TIFF_VERSION=4.6.0
@@ -65,21 +61,15 @@ function build_brotli {
6561
}
6662

6763
function build_harfbuzz {
68-
if [[ "$HARFBUZZ_VERSION" == 8.5.0 ]]; then
69-
export FREETYPE_LIBS=-lfreetype
70-
export FREETYPE_CFLAGS=-I/usr/local/include/freetype2/
71-
build_simple harfbuzz $HARFBUZZ_VERSION https://github.com/harfbuzz/harfbuzz/releases/download/$HARFBUZZ_VERSION tar.xz --with-freetype=yes --with-glib=no
72-
export FREETYPE_LIBS=""
73-
export FREETYPE_CFLAGS=""
74-
else
75-
local out_dir=$(fetch_unpack https://github.com/harfbuzz/harfbuzz/releases/download/$HARFBUZZ_VERSION/$HARFBUZZ_VERSION.tar.xz harfbuzz-$HARFBUZZ_VERSION.tar.xz)
76-
(cd $out_dir \
77-
&& meson setup build --buildtype=release -Dfreetype=enabled -Dglib=disabled)
78-
(cd $out_dir/build \
79-
&& meson install)
80-
if [[ "$MB_ML_LIBC" == "manylinux" ]]; then
81-
cp /usr/local/lib64/libharfbuzz* /usr/local/lib
82-
fi
64+
python3 -m pip install meson ninja
65+
66+
local out_dir=$(fetch_unpack https://github.com/harfbuzz/harfbuzz/releases/download/$HARFBUZZ_VERSION/$HARFBUZZ_VERSION.tar.xz harfbuzz-$HARFBUZZ_VERSION.tar.xz)
67+
(cd $out_dir \
68+
&& meson setup build --buildtype=release -Dfreetype=enabled -Dglib=disabled)
69+
(cd $out_dir/build \
70+
&& meson install)
71+
if [[ "$MB_ML_LIBC" == "manylinux" ]]; then
72+
cp /usr/local/lib64/libharfbuzz* /usr/local/lib
8373
fi
8474
}
8575

@@ -155,13 +145,7 @@ if [[ -n "$IS_MACOS" ]]; then
155145
brew remove --ignore-dependencies webp
156146
fi
157147

158-
brew install meson pkg-config
159-
elif [[ "$MB_ML_LIBC" == "manylinux" ]]; then
160-
if [[ "$HARFBUZZ_VERSION" != 8.5.0 ]]; then
161-
yum install -y meson
162-
fi
163-
else
164-
apk add meson
148+
brew install pkg-config
165149
fi
166150

167151
wrap_wheel_builder build

.github/workflows/wheels.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,18 @@ jobs:
105105
- name: "macOS 10.10 x86_64"
106106
os: macos-13
107107
cibw_arch: x86_64
108-
build: "pp310* cp3{9,10,11}*"
108+
build: "cp3{9,10,11}*"
109109
macosx_deployment_target: "10.10"
110110
- name: "macOS 10.13 x86_64"
111111
os: macos-13
112112
cibw_arch: x86_64
113113
build: "cp3{12,13}*"
114114
macosx_deployment_target: "10.13"
115+
- name: "macOS 10.15 x86_64"
116+
os: macos-13
117+
cibw_arch: x86_64
118+
build: "pp310*"
119+
macosx_deployment_target: "10.15"
115120
- name: "macOS arm64"
116121
os: macos-latest
117122
cibw_arch: arm64
@@ -273,7 +278,7 @@ jobs:
273278
path: dist
274279
merge-multiple: true
275280
- name: Upload wheels to scientific-python-nightly-wheels
276-
uses: scientific-python/upload-nightly-action@b67d7fcc0396e1128a474d1ab2b48aa94680f9fc # 0.5.0
281+
uses: scientific-python/upload-nightly-action@ccf29c805b5d0c1dc31fa97fcdb962be074cade3 # 0.6.0
277282
with:
278283
artifacts_path: dist
279284
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}

CHANGES.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,30 @@ Changelog (Pillow)
55
11.0.0 (unreleased)
66
-------------------
77

8+
- Improved copying imagequant libraries #8420
9+
[radarhere]
10+
11+
- Use Capsule for WebP saving #8386
12+
[homm, radarhere]
13+
14+
- Fixed writing multiple StripOffsets to TIFF #8317
15+
[Yay295, radarhere]
16+
17+
- Fix dereference before checking for NULL in ImagingTransformAffine #8398
18+
[PavlNekrasov]
19+
20+
- Use transposed size after opening for TIFF images #8390
21+
[radarhere, homm]
22+
23+
- Improve ImageFont error messages #8338
24+
[yngvem, radarhere, hugovk]
25+
26+
- Mention MAX_TEXT_CHUNK limit in PNG error message #8391
27+
[radarhere]
28+
29+
- Cast Dib handle to int #8385
30+
[radarhere]
31+
832
- Accept float stroke widths #8369
933
[radarhere]
1034

0 commit comments

Comments
 (0)