Skip to content

Commit e9f831d

Browse files
authored
Merge branch 'main' into geometry
2 parents e57da68 + ed143f5 commit e9f831d

19 files changed

Lines changed: 188 additions & 147 deletions

.appveyor.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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/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/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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ 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
2521
JPEGTURBO_VERSION=3.0.4
2622
OPENJPEG_VERSION=2.5.2
@@ -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: 6 additions & 1 deletion
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

CHANGES.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ 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+
820
- Use transposed size after opening for TIFF images #8390
921
[radarhere, homm]
1022

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ lint-fix:
117117
python3 -c "import black" > /dev/null 2>&1 || python3 -m pip install black
118118
python3 -m black .
119119
python3 -c "import ruff" > /dev/null 2>&1 || python3 -m pip install ruff
120-
python3 -m ruff --fix .
120+
python3 -m ruff check --fix .
121121

122122
.PHONY: mypy
123123
mypy:

Tests/test_file_tiff.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ def test_bigtiff(self, tmp_path: Path) -> None:
108108
assert_image_equal_tofile(im, "Tests/images/hopper.tif")
109109

110110
with Image.open("Tests/images/hopper_bigtiff.tif") as im:
111-
# multistrip support not yet implemented
111+
# The data type of this file's StripOffsets tag is LONG8,
112+
# which is not yet supported for offset data when saving multiple frames.
112113
del im.tag_v2[273]
113114

114115
outfile = str(tmp_path / "temp.tif")

0 commit comments

Comments
 (0)