Skip to content

Commit f8d9326

Browse files
committed
Merge branch 'main' into i16n
2 parents a0e1608 + 079caf6 commit f8d9326

File tree

262 files changed

+3279
-1965
lines changed

Some content is hidden

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

262 files changed

+3279
-1965
lines changed

.appveyor.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ environment:
2121
install:
2222
- '%PYTHON%\%EXECUTABLE% --version'
2323
- curl -fsSL -o pillow-depends.zip https://github.com/python-pillow/pillow-depends/archive/main.zip
24+
- curl -fsSL -o pillow-test-images.zip https://github.com/python-pillow/test-images/archive/main.zip
2425
- 7z x pillow-depends.zip -oc:\
26+
- 7z x pillow-test-images.zip -oc:\
2527
- mv c:\pillow-depends-main c:\pillow-depends
26-
- xcopy /S /Y c:\pillow-depends\test_images\* c:\pillow\tests\images
28+
- xcopy /S /Y c:\test-images-main\* c:\pillow\tests\images
2729
- 7z x ..\pillow-depends\nasm-2.15.05-win64.zip -oc:\
2830
- ..\pillow-depends\gs1000w32.exe /S
2931
- path c:\nasm-2.15.05;C:\Program Files (x86)\gs\gs10.0.0\bin;%PATH%

.ci/install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ python3 -m pip install -U pytest-timeout
3737
python3 -m pip install pyroma
3838

3939
if [[ $(uname) != CYGWIN* ]]; then
40-
python3 -m pip install numpy
40+
# TODO Remove condition when NumPy supports 3.12
41+
if ! [ "$GHA_PYTHON_VERSION" == "3.12-dev" ]; then python3 -m pip install numpy ; fi
4142

4243
# PyQt6 doesn't support PyPy3
4344
if [[ $GHA_PYTHON_VERSION == 3.* ]]; then

.github/workflows/cifuzz.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@ name: CIFuzz
33
on:
44
push:
55
paths:
6+
- ".github/workflows/cifuzz.yml"
67
- "**.c"
78
- "**.h"
89
pull_request:
910
paths:
11+
- ".github/workflows/cifuzz.yml"
1012
- "**.c"
1113
- "**.h"
1214
workflow_dispatch:
1315

1416
permissions:
1517
contents: read
1618

17-
concurrency:
19+
concurrency:
1820
group: ${{ github.workflow }}-${{ github.ref }}
1921
cancel-in-progress: true
2022

.github/workflows/docs.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
paths:
6+
- ".github/workflows/docs.yml"
7+
- "docs/**"
8+
pull_request:
9+
paths:
10+
- ".github/workflows/docs.yml"
11+
- "docs/**"
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: read
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
build:
23+
24+
runs-on: ubuntu-latest
25+
name: Docs
26+
27+
steps:
28+
- uses: actions/checkout@v3
29+
30+
- name: Set up Python
31+
uses: actions/setup-python@v4
32+
with:
33+
python-version: "3.x"
34+
cache: pip
35+
cache-dependency-path: ".ci/*.sh"
36+
37+
- name: Build system information
38+
run: python3 .github/workflows/system-info.py
39+
40+
- name: Install Linux dependencies
41+
run: |
42+
.ci/install.sh
43+
env:
44+
GHA_PYTHON_VERSION: "3.x"
45+
46+
- name: Build
47+
run: |
48+
.ci/build.sh
49+
50+
- name: Docs
51+
run: |
52+
make doccheck

.github/workflows/macos-install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ python3 -m pip install -U pytest-cov
1313
python3 -m pip install -U pytest-timeout
1414
python3 -m pip install pyroma
1515

16-
python3 -m pip install numpy
16+
# TODO Remove condition when NumPy supports 3.12
17+
if ! [ "$GHA_PYTHON_VERSION" == "3.12-dev" ]; then python3 -m pip install numpy ; fi
1718

1819
# extra test images
1920
pushd depends && ./install_extra_test_images.sh && popd

.github/workflows/test-cygwin.yml

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
name: Test Cygwin
22

3-
on: [push, pull_request, workflow_dispatch]
3+
on:
4+
push:
5+
paths-ignore:
6+
- ".github/workflows/docs.yml"
7+
- "docs/**"
8+
pull_request:
9+
paths-ignore:
10+
- ".github/workflows/docs.yml"
11+
- "docs/**"
12+
workflow_dispatch:
413

514
permissions:
615
contents: read
@@ -34,18 +43,34 @@ jobs:
3443
with:
3544
platform: x86_64
3645
packages: >
37-
ImageMagick gcc-g++ ghostscript jpeg libfreetype-devel
38-
libimagequant-devel libjpeg-devel liblapack-devel
39-
liblcms2-devel libopenjp2-devel libraqm-devel
40-
libtiff-devel libwebp-devel libxcb-devel libxcb-xinerama0
41-
make netpbm perl
46+
gcc-g++
47+
ghostscript
48+
ImageMagick
49+
jpeg
50+
libfreetype-devel
51+
libimagequant-devel
52+
libjpeg-devel
53+
liblapack-devel
54+
liblcms2-devel
55+
libopenjp2-devel
56+
libraqm-devel
57+
libtiff-devel
58+
libwebp-devel
59+
libxcb-devel
60+
libxcb-xinerama0
61+
make
62+
netpbm
63+
perl
4264
python3${{ matrix.python-minor-version }}-cffi
4365
python3${{ matrix.python-minor-version }}-cython
4466
python3${{ matrix.python-minor-version }}-devel
4567
python3${{ matrix.python-minor-version }}-numpy
4668
python3${{ matrix.python-minor-version }}-sip
4769
python3${{ matrix.python-minor-version }}-tkinter
48-
qt5-devel-tools subversion xorg-server-extra zlib-devel
70+
qt5-devel-tools
71+
wget
72+
xorg-server-extra
73+
zlib-devel
4974
5075
- name: Add Lapack to PATH
5176
uses: egor-tensin/cleanup-path@v3

.github/workflows/test-docker.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
name: Test Docker
22

3-
on: [push, pull_request, workflow_dispatch]
3+
on:
4+
push:
5+
paths-ignore:
6+
- ".github/workflows/docs.yml"
7+
- "docs/**"
8+
pull_request:
9+
paths-ignore:
10+
- ".github/workflows/docs.yml"
11+
- "docs/**"
12+
workflow_dispatch:
413

514
permissions:
615
contents: read
@@ -87,6 +96,7 @@ jobs:
8796
with:
8897
flags: GHA_Docker
8998
name: ${{ matrix.docker }}
99+
gcov: true
90100

91101
success:
92102
permissions:

.github/workflows/test-mingw.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
name: Test MinGW
22

3-
on: [push, pull_request, workflow_dispatch]
3+
on:
4+
push:
5+
paths-ignore:
6+
- ".github/workflows/docs.yml"
7+
- "docs/**"
8+
pull_request:
9+
paths-ignore:
10+
- ".github/workflows/docs.yml"
11+
- "docs/**"
12+
workflow_dispatch:
413

514
permissions:
615
contents: read
716

8-
concurrency:
17+
concurrency:
918
group: ${{ github.workflow }}-${{ github.ref }}
1019
cancel-in-progress: true
1120

@@ -45,12 +54,6 @@ jobs:
4554
- name: Install dependencies
4655
run: |
4756
pacman -S --noconfirm \
48-
${{ matrix.package }}-python3-cffi \
49-
${{ matrix.package }}-python3-numpy \
50-
${{ matrix.package }}-python3-olefile \
51-
${{ matrix.package }}-python3-pip \
52-
${{ matrix.package }}-python-pyqt6 \
53-
${{ matrix.package }}-python3-setuptools \
5457
${{ matrix.package }}-freetype \
5558
${{ matrix.package }}-gcc \
5659
${{ matrix.package }}-ghostscript \
@@ -61,7 +64,16 @@ jobs:
6164
${{ matrix.package }}-libtiff \
6265
${{ matrix.package }}-libwebp \
6366
${{ matrix.package }}-openjpeg2 \
64-
subversion
67+
${{ matrix.package }}-python3-cffi \
68+
${{ matrix.package }}-python3-numpy \
69+
${{ matrix.package }}-python3-olefile \
70+
${{ matrix.package }}-python3-pip \
71+
${{ matrix.package }}-python3-setuptools
72+
73+
if [ ${{ matrix.package }} == "mingw-w64-x86_64" ]; then
74+
pacman -S --noconfirm \
75+
${{ matrix.package }}-python-pyqt6
76+
fi
6577
6678
python3 -m pip install pyroma pytest pytest-cov pytest-timeout
6779

.github/workflows/test-valgrind.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,20 @@ name: Test Valgrind
55
on:
66
push:
77
paths:
8+
- ".github/workflows/test-valgrind.yml"
89
- "**.c"
910
- "**.h"
1011
pull_request:
1112
paths:
13+
- ".github/workflows/test-valgrind.yml"
1214
- "**.c"
1315
- "**.h"
1416
workflow_dispatch:
1517

1618
permissions:
1719
contents: read
1820

19-
concurrency:
21+
concurrency:
2022
group: ${{ github.workflow }}-${{ github.ref }}
2123
cancel-in-progress: true
2224

@@ -48,5 +50,5 @@ jobs:
4850
run: |
4951
# The Pillow user in the docker container is UID 1000
5052
sudo chown -R 1000 $GITHUB_WORKSPACE
51-
docker run --name pillow_container -v $GITHUB_WORKSPACE:/Pillow pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
53+
docker run --name pillow_container -e "PILLOW_VALGRIND_TEST=true" -v $GITHUB_WORKSPACE:/Pillow pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
5254
sudo chown -R runner $GITHUB_WORKSPACE

.github/workflows/test-windows.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
name: Test Windows
22

3-
on: [push, pull_request, workflow_dispatch]
3+
on:
4+
push:
5+
paths-ignore:
6+
- ".github/workflows/docs.yml"
7+
- "docs/**"
8+
pull_request:
9+
paths-ignore:
10+
- ".github/workflows/docs.yml"
11+
- "docs/**"
12+
workflow_dispatch:
413

514
permissions:
615
contents: read
@@ -15,7 +24,7 @@ jobs:
1524
strategy:
1625
fail-fast: false
1726
matrix:
18-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
27+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev"]
1928
architecture: ["x86", "x64"]
2029
include:
2130
# PyPy 7.3.4+ only ships 64-bit binaries for Windows
@@ -38,6 +47,12 @@ jobs:
3847
repository: python-pillow/pillow-depends
3948
path: winbuild\depends
4049

50+
- name: Checkout extra test images
51+
uses: actions/checkout@v3
52+
with:
53+
repository: python-pillow/test-images
54+
path: Tests\test-images
55+
4156
# sets env: pythonLocation
4257
- name: Set up Python
4358
uses: actions/setup-python@v4
@@ -62,7 +77,8 @@ jobs:
6277
winbuild\depends\gs1000w32.exe /S
6378
echo "C:\Program Files (x86)\gs\gs10.0.0\bin" >> $env:GITHUB_PATH
6479
65-
xcopy /S /Y winbuild\depends\test_images\* Tests\images\
80+
# Install extra test images
81+
xcopy /S /Y Tests\test-images\* Tests\images
6682
6783
# make cache key depend on VS version
6884
& "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" `

0 commit comments

Comments
 (0)