Skip to content

Commit fc5c096

Browse files
authored
Merge branch 'main' into progress
2 parents ebbdc6e + b0d79c8 commit fc5c096

80 files changed

Lines changed: 816 additions & 448 deletions

Some content is hidden

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

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ environment:
1818
TEST_OPTIONS:
1919
DEPLOY: YES
2020
matrix:
21-
- PYTHON: C:/Python312
21+
- PYTHON: C:/Python313
2222
ARCHITECTURE: x86
2323
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
2424
- PYTHON: C:/Python39-x64

.ci/requirements-cibw.txt

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

.github/workflows/cifuzz.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ on:
66
- "**"
77
paths:
88
- ".github/workflows/cifuzz.yml"
9+
- ".github/workflows/wheels-dependencies.sh"
910
- "**.c"
1011
- "**.h"
1112
pull_request:
1213
paths:
1314
- ".github/workflows/cifuzz.yml"
15+
- ".github/workflows/wheels-dependencies.sh"
1416
- "**.c"
1517
- "**.h"
1618
workflow_dispatch:
@@ -24,8 +26,6 @@ concurrency:
2426

2527
jobs:
2628
Fuzzing:
27-
# Disabled until google/oss-fuzz#11419 upgrades Python to 3.9+
28-
if: false
2929
runs-on: ubuntu-latest
3030
steps:
3131
- name: Build Fuzzers

.github/workflows/wheels-dependencies.sh

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,11 @@ 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=10.0.1
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
27-
XZ_VERSION=5.6.2
23+
XZ_VERSION=5.6.3
2824
TIFF_VERSION=4.6.0
2925
LCMS2_VERSION=2.16
3026
if [[ -n "$IS_MACOS" ]]; then
@@ -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: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ env:
4141

4242
jobs:
4343
build-1-QEMU-emulated-wheels:
44-
if: github.event_name != 'schedule' && github.event_name != 'workflow_dispatch'
44+
if: github.event_name != 'schedule'
4545
name: aarch64 ${{ matrix.python-version }} ${{ matrix.spec }}
4646
runs-on: ubuntu-latest
4747
strategy:
@@ -278,7 +278,7 @@ jobs:
278278
path: dist
279279
merge-multiple: true
280280
- name: Upload wheels to scientific-python-nightly-wheels
281-
uses: scientific-python/upload-nightly-action@b67d7fcc0396e1128a474d1ab2b48aa94680f9fc # 0.5.0
281+
uses: scientific-python/upload-nightly-action@82396a2ed4269ba06c6b2988bb4fd568ef3c3d6b # 0.6.1
282282
with:
283283
artifacts_path: dist
284284
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}
@@ -301,3 +301,5 @@ jobs:
301301
merge-multiple: true
302302
- name: Publish to PyPI
303303
uses: pypa/gh-action-pypi-publish@release/v1
304+
with:
305+
attestations: true

.pre-commit-config.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.6.3
3+
rev: v0.6.9
44
hooks:
55
- id: ruff
66
args: [--exit-non-zero-on-fix]
@@ -11,7 +11,7 @@ repos:
1111
- id: black
1212

1313
- repo: https://github.com/PyCQA/bandit
14-
rev: 1.7.9
14+
rev: 1.7.10
1515
hooks:
1616
- id: bandit
1717
args: [--severity-level=high]
@@ -24,7 +24,7 @@ repos:
2424
exclude: (Makefile$|\.bat$|\.cmake$|\.eps$|\.fits$|\.gd$|\.opt$)
2525

2626
- repo: https://github.com/pre-commit/mirrors-clang-format
27-
rev: v18.1.8
27+
rev: v19.1.1
2828
hooks:
2929
- id: clang-format
3030
types: [c]
@@ -36,7 +36,7 @@ repos:
3636
- id: rst-backticks
3737

3838
- repo: https://github.com/pre-commit/pre-commit-hooks
39-
rev: v4.6.0
39+
rev: v5.0.0
4040
hooks:
4141
- id: check-executables-have-shebangs
4242
- id: check-shebang-scripts-are-executable
@@ -50,29 +50,29 @@ repos:
5050
exclude: ^.github/.*TEMPLATE|^Tests/(fonts|images)/
5151

5252
- repo: https://github.com/python-jsonschema/check-jsonschema
53-
rev: 0.29.2
53+
rev: 0.29.3
5454
hooks:
5555
- id: check-github-workflows
5656
- id: check-readthedocs
5757
- id: check-renovate
5858

5959
- repo: https://github.com/sphinx-contrib/sphinx-lint
60-
rev: v0.9.1
60+
rev: v1.0.0
6161
hooks:
6262
- id: sphinx-lint
6363

6464
- repo: https://github.com/tox-dev/pyproject-fmt
65-
rev: 2.2.1
65+
rev: 2.2.4
6666
hooks:
6767
- id: pyproject-fmt
6868

6969
- repo: https://github.com/abravalheri/validate-pyproject
70-
rev: v0.19
70+
rev: v0.20.2
7171
hooks:
7272
- id: validate-pyproject
7373

7474
- repo: https://github.com/tox-dev/tox-ini-fmt
75-
rev: 1.3.1
75+
rev: 1.4.1
7676
hooks:
7777
- id: tox-ini-fmt
7878

CHANGES.rst

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,42 @@ Changelog (Pillow)
55
11.0.0 (unreleased)
66
-------------------
77

8-
- Fixed writing multiple StripOffsets to TIFF #8317
8+
- Do not close provided file handles with libtiff when saving #8458
9+
[radarhere]
10+
11+
- Support ImageFilter.BuiltinFilter for I;16* images #8438
12+
[radarhere]
13+
14+
- Use ImagingCore.ptr instead of ImagingCore.id #8341
15+
[homm, radarhere, hugovk]
16+
17+
- Updated EPS mode when opening images without transparency #8281
918
[Yay295, radarhere]
1019

11-
- Shared imagequant libraries may be located within usr/lib64 #8407
20+
- Use transparency when combining P frames from APNGs #8443
1221
[radarhere]
1322

23+
- Support all resampling filters when resizing I;16* images #8422
24+
[radarhere]
25+
26+
- Free memory on early return #8413
27+
[radarhere]
28+
29+
- Cast int before potentially exceeding INT_MAX #8402
30+
[radarhere]
31+
32+
- Check image value before use #8400
33+
[radarhere]
34+
35+
- Improved copying imagequant libraries #8420
36+
[radarhere]
37+
38+
- Use Capsule for WebP saving #8386
39+
[homm, radarhere]
40+
41+
- Fixed writing multiple StripOffsets to TIFF #8317
42+
[Yay295, radarhere]
43+
1444
- Fix dereference before checking for NULL in ImagingTransformAffine #8398
1545
[PavlNekrasov]
1646

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ coverage:
1717
.PHONY: doc
1818
.PHONY: html
1919
doc html:
20-
python3 -c "import PIL" > /dev/null 2>&1 || python3 -m pip install .
2120
$(MAKE) -C docs html
2221

2322
.PHONY: htmlview
2423
htmlview:
25-
python3 -c "import PIL" > /dev/null 2>&1 || python3 -m pip install .
2624
$(MAKE) -C docs htmlview
2725

2826
.PHONY: doccheck
@@ -117,7 +115,7 @@ lint-fix:
117115
python3 -c "import black" > /dev/null 2>&1 || python3 -m pip install black
118116
python3 -m black .
119117
python3 -c "import ruff" > /dev/null 2>&1 || python3 -m pip install ruff
120-
python3 -m ruff --fix .
118+
python3 -m ruff check --fix .
121119

122120
.PHONY: mypy
123121
mypy:

Tests/images/eps/1.bmp

1.17 KB
Binary file not shown.

0 commit comments

Comments
 (0)