Skip to content

Commit 26ae44e

Browse files
committed
Merge branch 'main' into ttb
2 parents f056c25 + a370209 commit 26ae44e

File tree

376 files changed

+20641
-3284
lines changed

Some content is hidden

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

376 files changed

+20641
-3284
lines changed

.ci/install.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
aptget_update()
44
{
5-
if [ ! -z $1 ]; then
5+
if [ -n "$1" ]; then
66
echo ""
77
echo "Retrying apt-get update..."
88
echo ""
99
fi
10-
output=`sudo apt-get update 2>&1`
10+
output=$(sudo apt-get update 2>&1)
1111
echo "$output"
1212
if [[ $output == *[WE]:\ * ]]; then
1313
return 1
@@ -20,10 +20,10 @@ fi
2020
set -e
2121

2222
if [[ $(uname) != CYGWIN* ]]; then
23-
sudo apt-get -qq install libfreetype6-dev liblcms2-dev python3-tk\
23+
sudo apt-get -qq install libfreetype6-dev liblcms2-dev libtiff-dev python3-tk\
2424
ghostscript libjpeg-turbo8-dev libopenjp2-7-dev\
2525
cmake meson imagemagick libharfbuzz-dev libfribidi-dev\
26-
sway wl-clipboard libopenblas-dev
26+
sway wl-clipboard libopenblas-dev nasm
2727
fi
2828

2929
python3 -m pip install --upgrade pip
@@ -36,6 +36,9 @@ python3 -m pip install -U pytest
3636
python3 -m pip install -U pytest-cov
3737
python3 -m pip install -U pytest-timeout
3838
python3 -m pip install pyroma
39+
# optional test dependency, only install if there's a binary package.
40+
# fails on beta 3.14 and PyPy
41+
python3 -m pip install --only-binary=:all: pyarrow || true
3942

4043
if [[ $(uname) != CYGWIN* ]]; then
4144
python3 -m pip install numpy
@@ -50,7 +53,7 @@ if [[ $(uname) != CYGWIN* ]]; then
5053
# Pyroma uses non-isolated build and fails with old setuptools
5154
if [[ $GHA_PYTHON_VERSION == 3.9 ]]; then
5255
# To match pyproject.toml
53-
python3 -m pip install "setuptools>=67.8"
56+
python3 -m pip install "setuptools>=77"
5457
fi
5558

5659
# webp
@@ -62,6 +65,9 @@ if [[ $(uname) != CYGWIN* ]]; then
6265
# raqm
6366
pushd depends && ./install_raqm.sh && popd
6467

68+
# libavif
69+
pushd depends && ./install_libavif.sh && popd
70+
6571
# extra test images
6672
pushd depends && ./install_extra_test_images.sh && popd
6773
else

.ci/requirements-cibw.txt

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

.ci/requirements-mypy.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
mypy==1.14.1
1+
mypy==1.16.1
22
IceSpringPySideStubs-PyQt6
33
IceSpringPySideStubs-PySide6
44
ipython
55
numpy
66
packaging
7+
pyarrow-stubs
78
pytest
89
sphinx
910
types-atheris

.ci/test.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
python.exe -c "from PIL import Image"
22
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
3+
python.exe -bb -m pytest -vv -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 --cov-report xml Tests $REVERSE
7+
python3 -bb -m pytest -vv -x -W always --cov PIL --cov Tests --cov-report term --cov-report xml Tests $REVERSE

.clang-format

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# A clang-format style that approximates Python's PEP 7
22
# Useful for IDE integration
3+
Language: C
34
BasedOnStyle: Google
45
AlwaysBreakAfterReturnType: All
56
AllowShortIfStatementsOnASingleLine: false
@@ -11,7 +12,26 @@ ColumnLimit: 88
1112
DerivePointerAlignment: false
1213
IndentGotoLabels: false
1314
IndentWidth: 4
15+
PointerAlignment: Right
16+
ReflowComments: true
17+
SortIncludes: false
18+
SpaceBeforeParens: ControlStatements
19+
SpacesInParentheses: false
20+
TabWidth: 4
21+
UseTab: Never
22+
---
1423
Language: Cpp
24+
BasedOnStyle: Google
25+
AlwaysBreakAfterReturnType: All
26+
AllowShortIfStatementsOnASingleLine: false
27+
AlignAfterOpenBracket: BlockIndent
28+
BinPackArguments: false
29+
BinPackParameters: false
30+
BreakBeforeBraces: Attach
31+
ColumnLimit: 88
32+
DerivePointerAlignment: false
33+
IndentGotoLabels: false
34+
IndentWidth: 4
1535
PointerAlignment: Right
1636
ReflowComments: true
1737
SortIncludes: false

.github/ISSUE_TEMPLATE/RELEASE.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: "Maintainers only: Release"
3+
about: For maintainers to schedule a quarterly release
4+
labels: Release
5+
---
6+
7+
## Main release
8+
9+
Released quarterly on January 2nd, April 1st, July 1st and October 15th.
10+
11+
* [ ] Open a release ticket e.g. https://github.com/python-pillow/Pillow/issues/3154
12+
* [ ] Develop and prepare release in `main` branch.
13+
* [ ] Add release notes e.g. https://github.com/python-pillow/Pillow/pull/8885
14+
* [ ] Check [GitHub Actions](https://github.com/python-pillow/Pillow/actions) to confirm passing tests in `main` branch.
15+
* [ ] Check that all the wheel builds pass the tests in the [GitHub Actions "Wheels" workflow](https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml) jobs by manually triggering them.
16+
* [ ] In compliance with [PEP 440](https://peps.python.org/pep-0440/), update version identifier in `src/PIL/_version.py`
17+
* [ ] Run pre-release check via `make release-test` in a freshly cloned repo.
18+
* [ ] Create branch and tag for release e.g.:
19+
```bash
20+
git branch [[MAJOR.MINOR]].x
21+
git tag [[MAJOR.MINOR]].0
22+
git push --tags
23+
```
24+
* [ ] Check the [GitHub Actions "Wheels" workflow](https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml) has passed, including the "Upload release to PyPI" job. This will have been triggered by the new tag.
25+
* [ ] Publish the [release on GitHub](https://github.com/python-pillow/Pillow/releases).
26+
* [ ] In compliance with [PEP 440](https://peps.python.org/pep-0440/), increment and append `.dev0` to version identifier in `src/PIL/_version.py` and then:
27+
```bash
28+
git push --all
29+
```
30+
31+
## Publicize release
32+
33+
* [ ] Announce release availability via [Mastodon](https://fosstodon.org/@pillow) e.g. https://fosstodon.org/@pillow/110639450470725321
34+
35+
## Documentation
36+
37+
* [ ] Make sure the [default version for Read the Docs](https://pillow.readthedocs.io/en/stable/) is up-to-date with the release changes
38+
39+
## Docker images
40+
41+
* [ ] Update Pillow in the Docker Images repository
42+
```bash
43+
git clone https://github.com/python-pillow/docker-images
44+
cd docker-images
45+
./update-pillow-tag.sh [[release tag]]
46+
```

.github/renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
}
1717
],
1818
"schedule": [
19-
"on the 3rd day of the month"
19+
"* * 3 * *"
2020
]
2121
}

.github/workflows/macos-install.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ if [[ "$ImageOS" == "macos13" ]]; then
66
brew uninstall gradle maven
77
fi
88
brew install \
9+
aom \
10+
dav1d \
911
freetype \
1012
ghostscript \
1113
jpeg-turbo \
@@ -14,6 +16,8 @@ brew install \
1416
libtiff \
1517
little-cms2 \
1618
openjpeg \
19+
rav1e \
20+
svt-av1 \
1721
webp
1822
export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig"
1923

@@ -26,6 +30,12 @@ python3 -m pip install -U pytest-cov
2630
python3 -m pip install -U pytest-timeout
2731
python3 -m pip install pyroma
2832
python3 -m pip install numpy
33+
# optional test dependency, only install if there's a binary package.
34+
# fails on beta 3.14 and PyPy
35+
python3 -m pip install --only-binary=:all: pyarrow || true
36+
37+
# libavif
38+
pushd depends && ./install_libavif.sh && popd
2939

3040
# extra test images
3141
pushd depends && ./install_extra_test_images.sh && popd

.github/workflows/test-docker.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ jobs:
3535
matrix:
3636
os: ["ubuntu-latest"]
3737
docker: [
38+
# Run slower jobs first to give them a headstart and reduce waiting time
39+
ubuntu-24.04-noble-ppc64le,
40+
ubuntu-24.04-noble-s390x,
41+
# Then run the remainder
3842
alpine,
3943
amazon-2-amd64,
4044
amazon-2023-amd64,
@@ -43,22 +47,18 @@ jobs:
4347
centos-stream-10-amd64,
4448
debian-12-bookworm-x86,
4549
debian-12-bookworm-amd64,
46-
fedora-40-amd64,
4750
fedora-41-amd64,
51+
fedora-42-amd64,
4852
gentoo,
4953
ubuntu-22.04-jammy-amd64,
5054
ubuntu-24.04-noble-amd64,
5155
]
5256
dockerTag: [main]
5357
include:
5458
- docker: "ubuntu-24.04-noble-ppc64le"
55-
os: "ubuntu-22.04"
5659
qemu-arch: "ppc64le"
57-
dockerTag: main
5860
- docker: "ubuntu-24.04-noble-s390x"
59-
os: "ubuntu-22.04"
6061
qemu-arch: "s390x"
61-
dockerTag: main
6262
- docker: "ubuntu-24.04-noble-arm64v8"
6363
os: "ubuntu-24.04-arm"
6464
dockerTag: main
@@ -75,8 +75,9 @@ jobs:
7575

7676
- name: Set up QEMU
7777
if: "matrix.qemu-arch"
78-
run: |
79-
docker run --rm --privileged aptman/qus -s -- -p ${{ matrix.qemu-arch }}
78+
uses: docker/setup-qemu-action@v3
79+
with:
80+
platforms: ${{ matrix.qemu-arch }}
8081

8182
- name: Docker pull
8283
run: |

0 commit comments

Comments
 (0)