Skip to content

Commit 1303266

Browse files
committed
Merge branch 'main' into debug-build
2 parents 749ec2a + c388ad0 commit 1303266

File tree

241 files changed

+4471
-2661
lines changed

Some content is hidden

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

241 files changed

+4471
-2661
lines changed

.appveyor.yml

+6-7
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
@@ -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\
@@ -51,11 +51,10 @@ build_script:
5151

5252
test_script:
5353
- cd c:\pillow
54-
- '%PYTHON%\%EXECUTABLE% -m pip install pytest pytest-cov pytest-timeout defusedxml numpy olefile pyroma'
54+
- '%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/install.sh

+4-11
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ set -e
2121

2222
if [[ $(uname) != CYGWIN* ]]; then
2323
sudo apt-get -qq install libfreetype6-dev liblcms2-dev python3-tk\
24-
ghostscript libffi-dev libjpeg-turbo-progs libopenjp2-7-dev\
24+
ghostscript libjpeg-turbo-progs libopenjp2-7-dev\
2525
cmake meson imagemagick libharfbuzz-dev libfribidi-dev\
2626
sway wl-clipboard libopenblas-dev
2727
fi
@@ -30,19 +30,15 @@ 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
3839

3940
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
41+
python3 -m pip install numpy
4642

4743
# PyQt6 doesn't support PyPy3
4844
if [[ $GHA_PYTHON_VERSION == 3.* ]]; then
@@ -52,10 +48,7 @@ if [[ $(uname) != CYGWIN* ]]; then
5248
fi
5349

5450
# 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
51+
if [[ $GHA_PYTHON_VERSION == 3.9 ]]; then
5952
# To match pyproject.toml
6053
python3 -m pip install "setuptools>=67.8"
6154
fi

.ci/requirements-cibw.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cibuildwheel==2.19.2
1+
cibuildwheel==2.21.3

.ci/requirements-mypy.txt

+12-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1-
mypy==1.11.0
1+
mypy==1.13.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

+3
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

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

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Please send a pull request to the `main` branch. Please include [documentation](
1919
- Follow PEP 8.
2020
- When committing only documentation changes please include `[ci skip]` in the commit message to avoid running tests on AppVeyor.
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/release-drafter.yml

+5-6
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

+8-4
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+
"on the 3rd day of the month"
20+
]
1721
}

.github/workflows/cifuzz.yml

+2-2
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/docs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333

3434
steps:
3535
- uses: actions/checkout@v4
36+
with:
37+
persist-credentials: false
3638

3739
- name: Set up Python
3840
uses: actions/setup-python@v5

.github/workflows/lint.yml

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121

2222
steps:
2323
- uses: actions/checkout@v4
24+
with:
25+
persist-credentials: false
2426

2527
- name: pre-commit cache
2628
uses: actions/cache@v4

.github/workflows/macos-install.sh

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
set -e
44

5+
if [[ "$ImageOS" == "macos13" ]]; then
6+
brew uninstall gradle maven
7+
fi
58
brew install \
69
freetype \
710
ghostscript \
@@ -20,6 +23,7 @@ export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig"
2023

2124
python3 -m pip install coverage
2225
python3 -m pip install defusedxml
26+
python3 -m pip install ipython
2327
python3 -m pip install olefile
2428
python3 -m pip install -U pytest
2529
python3 -m pip install -U pytest-cov

.github/workflows/stale.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77

88
permissions:
9-
issues: write
9+
contents: read
1010

1111
concurrency:
1212
group: ${{ github.workflow }}-${{ github.ref }}
@@ -15,6 +15,8 @@ concurrency:
1515
jobs:
1616
stale:
1717
if: github.repository_owner == 'python-pillow'
18+
permissions:
19+
issues: write
1820

1921
runs-on: ubuntu-latest
2022

.github/workflows/test-cygwin.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ jobs:
4848
4949
- name: Checkout Pillow
5050
uses: actions/checkout@v4
51+
with:
52+
persist-credentials: false
5153

5254
- name: Install Cygwin
5355
uses: cygwin/cygwin-install-action@v4
@@ -74,6 +76,7 @@ jobs:
7476
perl
7577
python3${{ matrix.python-minor-version }}-cython
7678
python3${{ matrix.python-minor-version }}-devel
79+
python3${{ matrix.python-minor-version }}-ipython
7780
python3${{ matrix.python-minor-version }}-numpy
7881
python3${{ matrix.python-minor-version }}-sip
7982
python3${{ matrix.python-minor-version }}-tkinter
@@ -130,11 +133,12 @@ jobs:
130133
- name: After success
131134
run: |
132135
bash.exe .ci/after_success.sh
136+
rm C:\cygwin\bin\bash.EXE
133137
134138
- name: Upload coverage
135-
uses: codecov/codecov-action@v4
139+
uses: codecov/codecov-action@v5
136140
with:
137-
file: ./coverage.xml
141+
files: ./coverage.xml
138142
flags: GHA_Cygwin
139143
name: Cygwin Python 3.${{ matrix.python-minor-version }}
140144
token: ${{ secrets.CODECOV_ORG_TOKEN }}

.github/workflows/test-docker.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ jobs:
4646
centos-stream-9-amd64,
4747
debian-12-bookworm-x86,
4848
debian-12-bookworm-amd64,
49-
fedora-39-amd64,
5049
fedora-40-amd64,
50+
fedora-41-amd64,
5151
gentoo,
5252
ubuntu-22.04-jammy-amd64,
5353
ubuntu-24.04-noble-amd64,
@@ -65,6 +65,8 @@ jobs:
6565

6666
steps:
6767
- uses: actions/checkout@v4
68+
with:
69+
persist-credentials: false
6870

6971
- name: Build system information
7072
run: python3 .github/workflows/system-info.py
@@ -98,11 +100,10 @@ jobs:
98100
MATRIX_DOCKER: ${{ matrix.docker }}
99101

100102
- name: Upload coverage
101-
uses: codecov/codecov-action@v4
103+
uses: codecov/codecov-action@v5
102104
with:
103105
flags: GHA_Docker
104106
name: ${{ matrix.docker }}
105-
gcov: true
106107
token: ${{ secrets.CODECOV_ORG_TOKEN }}
107108

108109
success:

.github/workflows/test-mingw.yml

+10-9
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ jobs:
4646
steps:
4747
- name: Checkout Pillow
4848
uses: actions/checkout@v4
49+
with:
50+
persist-credentials: false
4951

5052
- name: Set up shell
5153
run: echo "C:\msys64\usr\bin\" >> $env:GITHUB_PATH
@@ -66,27 +68,26 @@ jobs:
6668
mingw-w64-x86_64-openjpeg2 \
6769
mingw-w64-x86_64-python3-numpy \
6870
mingw-w64-x86_64-python3-olefile \
69-
mingw-w64-x86_64-python3-setuptools \
71+
mingw-w64-x86_64-python3-pip \
72+
mingw-w64-x86_64-python-pytest \
73+
mingw-w64-x86_64-python-pytest-cov \
74+
mingw-w64-x86_64-python-pytest-timeout \
7075
mingw-w64-x86_64-python-pyqt6
7176
72-
python3 -m ensurepip
73-
python3 -m pip install pyroma pytest pytest-cov pytest-timeout
74-
7577
pushd depends && ./install_extra_test_images.sh && popd
7678
7779
- name: Build Pillow
78-
run: SETUPTOOLS_USE_DISTUTILS="stdlib" CFLAGS="-coverage" python3 -m pip install .
80+
run: CFLAGS="-coverage" python3 -m pip install .
7981

8082
- name: Test Pillow
8183
run: |
8284
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
85+
.ci/test.sh
8586
8687
- name: Upload coverage
87-
uses: codecov/codecov-action@v4
88+
uses: codecov/codecov-action@v5
8889
with:
89-
file: ./coverage.xml
90+
files: ./coverage.xml
9091
flags: GHA_Windows
9192
name: "MSYS2 MinGW"
9293
token: ${{ secrets.CODECOV_ORG_TOKEN }}

.github/workflows/test-valgrind.yml

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040

4141
steps:
4242
- uses: actions/checkout@v4
43+
with:
44+
persist-credentials: false
4345

4446
- name: Build system information
4547
run: python3 .github/workflows/system-info.py

0 commit comments

Comments
 (0)