Skip to content

Commit 1c7b3e4

Browse files
committed
Merge branch 'main' into vtf-support
2 parents 753964c + 07df26a commit 1c7b3e4

File tree

481 files changed

+13155
-6992
lines changed

Some content is hidden

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

481 files changed

+13155
-6992
lines changed

.appveyor.yml

Lines changed: 0 additions & 100 deletions
This file was deleted.

.ci/after_success.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,4 @@
22

33
# gather the coverage data
44
python3 -m pip install coverage
5-
if [[ $MATRIX_DOCKER ]]; then
6-
python3 -m coverage xml --ignore-errors
7-
else
8-
python3 -m coverage xml
9-
fi
5+
python3 -m coverage xml

.ci/build.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,5 @@
33
set -e
44

55
python3 -m coverage erase
6-
if [ $(uname) == "Darwin" ]; then
7-
export CPPFLAGS="-I/usr/local/miniconda/include";
8-
fi
96
make clean
107
make install-coverage

.ci/install.sh

Lines changed: 15 additions & 16 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,29 +20,28 @@ fi
2020
set -e
2121

2222
if [[ $(uname) != CYGWIN* ]]; then
23-
sudo apt-get -qq install libfreetype6-dev liblcms2-dev python3-tk\
24-
ghostscript libffi-dev libjpeg-turbo-progs libopenjp2-7-dev\
23+
sudo apt-get -qq install libfreetype6-dev liblcms2-dev libtiff-dev python3-tk\
24+
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
3030
python3 -m pip install --upgrade wheel
3131
python3 -m pip install coverage
3232
python3 -m pip install defusedxml
33+
python3 -m pip install ipython
3334
python3 -m pip install olefile
3435
python3 -m pip install -U pytest
3536
python3 -m pip install -U pytest-cov
3637
python3 -m pip install -U pytest-timeout
3738
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
3842

3943
if [[ $(uname) != CYGWIN* ]]; then
40-
# TODO Update condition when NumPy supports free-threading
41-
if [[ "$PYTHON_GIL" == "0" ]]; then
42-
python3 -m pip install numpy --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
43-
else
44-
python3 -m pip install numpy
45-
fi
44+
python3 -m pip install numpy
4645

4746
# PyQt6 doesn't support PyPy3
4847
if [[ $GHA_PYTHON_VERSION == 3.* ]]; then
@@ -52,12 +51,9 @@ if [[ $(uname) != CYGWIN* ]]; then
5251
fi
5352

5453
# Pyroma uses non-isolated build and fails with old setuptools
55-
if [[
56-
$GHA_PYTHON_VERSION == pypy3.9
57-
|| $GHA_PYTHON_VERSION == 3.9
58-
]]; then
54+
if [[ $GHA_PYTHON_VERSION == 3.9 ]]; then
5955
# To match pyproject.toml
60-
python3 -m pip install "setuptools>=67.8"
56+
python3 -m pip install "setuptools>=77"
6157
fi
6258

6359
# webp
@@ -69,6 +65,9 @@ if [[ $(uname) != CYGWIN* ]]; then
6965
# raqm
7066
pushd depends && ./install_raqm.sh && popd
7167

68+
# libavif
69+
pushd depends && CMAKE_POLICY_VERSION_MINIMUM=3.5 ./install_libavif.sh && popd
70+
7271
# extra test images
7372
pushd depends && ./install_extra_test_images.sh && popd
7473
else

.ci/requirements-cibw.txt

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

.ci/requirements-mypy.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1-
mypy==1.10.1
1+
mypy==1.15.0
2+
IceSpringPySideStubs-PyQt6
3+
IceSpringPySideStubs-PySide6
4+
ipython
5+
numpy
6+
packaging
7+
pytest
8+
sphinx
9+
types-atheris
10+
types-defusedxml
11+
types-olefile
12+
types-setuptools

.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

.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/CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@ Please send a pull request to the `main` branch. Please include [documentation](
99
- Fork the Pillow repository.
1010
- Create a branch from `main`.
1111
- Develop bug fixes, features, tests, etc.
12-
- Run the test suite. You can enable GitHub Actions (https://github.com/MY-USERNAME/Pillow/actions) and [AppVeyor](https://ci.appveyor.com/projects/new) on your repo to catch test failures prior to the pull request, and [Codecov](https://codecov.io/gh) to see if the changed code is covered by tests.
12+
- Run the test suite. You can enable GitHub Actions (https://github.com/MY-USERNAME/Pillow/actions) on your repo to catch test failures prior to the pull request, and [Codecov](https://codecov.io/gh) to see if the changed code is covered by tests.
1313
- Create a pull request to pull the changes from your branch to the Pillow `main`.
1414

1515
### Guidelines
1616

1717
- Separate code commits from reformatting commits.
1818
- Provide tests for any newly added code.
1919
- Follow PEP 8.
20-
- When committing only documentation changes please include `[ci skip]` in the commit message to avoid running tests on AppVeyor.
20+
- When committing only documentation changes please include `[ci skip]` in the commit message to avoid running extra tests.
2121
- Include [release notes](https://github.com/python-pillow/Pillow/tree/main/docs/releasenotes) as needed or appropriate with your bug fixes, feature additions and tests.
22-
- Do not add to the [changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst) for proposed changes, as that is updated after changes are merged.
2322

2423
## Reporting Issues
2524

.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/mergify.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ pull_request_rules:
99
- status-success=Windows Test Successful
1010
- status-success=MinGW
1111
- status-success=Cygwin Test Successful
12-
- status-success=continuous-integration/appveyor/pr
1312
actions:
1413
merge:
1514
method: merge

.github/release-drafter.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@ tag-template: "$NEXT_MINOR_VERSION"
33
change-template: '- $TITLE #$NUMBER [@$AUTHOR]'
44

55
categories:
6-
- title: "Dependencies"
7-
label: "Dependency"
6+
- title: "Removals"
7+
label: "Removal"
88
- title: "Deprecations"
99
label: "Deprecation"
1010
- title: "Documentation"
1111
label: "Documentation"
12-
- title: "Removals"
13-
label: "Removal"
12+
- title: "Dependencies"
13+
label: "Dependency"
1414
- title: "Testing"
1515
label: "Testing"
1616
- title: "Type hints"
1717
label: "Type hints"
18+
- title: "Other changes"
1819

1920
exclude-labels:
2021
- "changelog: skip"
@@ -23,6 +24,4 @@ template: |
2324
2425
https://pillow.readthedocs.io/en/stable/releasenotes/$NEXT_MINOR_VERSION.html
2526
26-
## Changes
27-
2827
$CHANGES

.github/renovate.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": [
4-
"config:base"
4+
"config:recommended"
55
],
66
"labels": [
77
"Dependency"
88
],
99
"packageRules": [
1010
{
1111
"groupName": "github-actions",
12-
"matchManagers": ["github-actions"],
13-
"separateMajorMinor": "false"
12+
"matchManagers": [
13+
"github-actions"
14+
],
15+
"separateMajorMinor": false
1416
}
1517
],
16-
"schedule": ["on the 3rd day of the month"]
18+
"schedule": [
19+
"* * 3 * *"
20+
]
1721
}

0 commit comments

Comments
 (0)