Skip to content

Commit c629234

Browse files
authored
Merge branch 'main' into convert_mode
2 parents 5b4e8d1 + 4996f84 commit c629234

267 files changed

Lines changed: 6856 additions & 4800 deletions

File tree

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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ environment:
1212
matrix:
1313
- PYTHON: C:/Python310
1414
ARCHITECTURE: x86
15-
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
15+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
1616
- PYTHON: C:/Python37-x64
1717
ARCHITECTURE: x64
1818
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
@@ -25,8 +25,8 @@ install:
2525
- mv c:\pillow-depends-main c:\pillow-depends
2626
- xcopy /S /Y c:\pillow-depends\test_images\* c:\pillow\tests\images
2727
- 7z x ..\pillow-depends\nasm-2.15.05-win64.zip -oc:\
28-
- ..\pillow-depends\gs9550w32.exe /S
29-
- path c:\nasm-2.15.05;C:\Program Files (x86)\gs\gs9.55.0\bin;%PATH%
28+
- ..\pillow-depends\gs9561w32.exe /S
29+
- path c:\nasm-2.15.05;C:\Program Files (x86)\gs\gs9.56.1\bin;%PATH%
3030
- cd c:\pillow\winbuild\
3131
- ps: |
3232
c:\python37\python.exe c:\pillow\winbuild\build_prepare.py -v --depends=C:\pillow-depends\
@@ -43,7 +43,7 @@ build_script:
4343

4444
test_script:
4545
- cd c:\pillow
46-
- '%PYTHON%\%EXECUTABLE% -m pip install pytest pytest-cov'
46+
- '%PYTHON%\%EXECUTABLE% -m pip install pytest pytest-cov pytest-timeout'
4747
- c:\"Program Files (x86)"\"Windows Kits"\10\Debuggers\x86\gflags.exe /p /enable %PYTHON%\%EXECUTABLE%
4848
- '%PYTHON%\%EXECUTABLE% -c "from PIL import Image"'
4949
- '%PYTHON%\%EXECUTABLE% -m pytest -vx --cov PIL --cov Tests --cov-report term --cov-report xml Tests'

.ci/after_success.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# gather the coverage data
4-
pip3 install codecov
4+
python3 -m pip install codecov
55
if [[ $MATRIX_DOCKER ]]; then
66
coverage xml --ignore-errors
77
else

.ci/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ set -e
1919

2020
sudo apt-get -qq install libfreetype6-dev liblcms2-dev python3-tk\
2121
ghostscript libffi-dev libjpeg-turbo-progs libopenjp2-7-dev\
22-
cmake imagemagick libharfbuzz-dev libfribidi-dev
22+
cmake meson imagemagick libharfbuzz-dev libfribidi-dev
2323

2424
python3 -m pip install --upgrade pip
2525
python3 -m pip install --upgrade wheel

.github/workflows/cifuzz.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: CIFuzz
2+
23
on:
34
push:
45
paths:
@@ -8,6 +9,7 @@ on:
89
paths:
910
- "**.c"
1011
- "**.h"
12+
workflow_dispatch:
1113

1214
jobs:
1315
Fuzzing:
@@ -29,13 +31,13 @@ jobs:
2931
language: python
3032
dry-run: false
3133
- name: Upload New Crash
32-
uses: actions/upload-artifact@v2
34+
uses: actions/upload-artifact@v3
3335
if: failure() && steps.build.outcome == 'success'
3436
with:
3537
name: artifacts
3638
path: ./out/artifacts
3739
- name: Upload Legacy Crash
38-
uses: actions/upload-artifact@v2
40+
uses: actions/upload-artifact@v3
3941
if: steps.run.outcome == 'success'
4042
with:
4143
name: crash

.github/workflows/lint.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Lint
22

3-
on: [push, pull_request]
3+
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
66
build:
@@ -10,15 +10,7 @@ jobs:
1010
name: Lint
1111

1212
steps:
13-
- uses: actions/checkout@v2
14-
15-
- name: pip cache
16-
uses: actions/cache@v2
17-
with:
18-
path: ~/.cache/pip
19-
key: lint-pip-${{ hashFiles('**/setup.py') }}
20-
restore-keys: |
21-
lint-pip-
13+
- uses: actions/checkout@v3
2214

2315
- name: pre-commit cache
2416
uses: actions/cache@v2
@@ -29,9 +21,11 @@ jobs:
2921
lint-pre-commit-
3022
3123
- name: Set up Python
32-
uses: actions/setup-python@v2
24+
uses: actions/setup-python@v3
3325
with:
34-
python-version: 3.8
26+
python-version: "3.10"
27+
cache: pip
28+
cache-dependency-path: "setup.py"
3529

3630
- name: Build system information
3731
run: python3 .github/workflows/system-info.py
@@ -45,4 +39,3 @@ jobs:
4539
run: tox -e lint
4640
env:
4741
PRE_COMMIT_COLOR: always
48-

.github/workflows/release-drafter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
# branches to consider in the event; optional, defaults to all
66
branches:
77
- main
8+
workflow_dispatch:
89

910
jobs:
1011
update_release_draft:

.github/workflows/test-docker.yml

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

3-
on: [push, pull_request]
3+
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
66
build:
@@ -19,11 +19,12 @@ jobs:
1919
amazon-2-amd64,
2020
arch,
2121
centos-7-amd64,
22-
centos-8-amd64,
2322
centos-stream-8-amd64,
23+
centos-stream-9-amd64,
2424
debian-10-buster-x86,
25-
fedora-34-amd64,
25+
debian-11-bullseye-x86,
2626
fedora-35-amd64,
27+
gentoo,
2728
ubuntu-18.04-bionic-amd64,
2829
ubuntu-20.04-focal-amd64,
2930
]
@@ -39,7 +40,7 @@ jobs:
3940
name: ${{ matrix.docker }}
4041

4142
steps:
42-
- uses: actions/checkout@v2
43+
- uses: actions/checkout@v3
4344

4445
- name: Build system information
4546
run: python3 .github/workflows/system-info.py

.github/workflows/test-mingw.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Test MinGW
22

3-
on: [push, pull_request]
3+
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
66
build:
7-
runs-on: windows-2019
7+
runs-on: windows-latest
88
strategy:
99
fail-fast: false
1010
matrix:
@@ -29,7 +29,7 @@ jobs:
2929

3030
steps:
3131
- name: Checkout Pillow
32-
uses: actions/checkout@v2
32+
uses: actions/checkout@v3
3333

3434
- name: Set up shell
3535
run: echo "C:\msys64\usr\bin\" >> $env:GITHUB_PATH
@@ -45,6 +45,7 @@ jobs:
4545
${{ matrix.package }}-python-pyqt6 \
4646
${{ matrix.package }}-python3-setuptools \
4747
${{ matrix.package }}-freetype \
48+
${{ matrix.package }}-gcc \
4849
${{ matrix.package }}-ghostscript \
4950
${{ matrix.package }}-lcms2 \
5051
${{ matrix.package }}-libimagequant \
@@ -60,7 +61,7 @@ jobs:
6061
pushd depends && ./install_extra_test_images.sh && popd
6162
6263
- name: Build Pillow
63-
run: CFLAGS="-coverage" python3 setup.py build_ext install
64+
run: CFLAGS="-coverage" python3 -m pip install --global-option="build_ext" .
6465

6566
- name: Test Pillow
6667
run: |

.github/workflows/test-valgrind.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
paths:
1212
- "**.c"
1313
- "**.h"
14+
workflow_dispatch:
1415

1516
jobs:
1617
build:
@@ -27,7 +28,7 @@ jobs:
2728
name: ${{ matrix.docker }}
2829

2930
steps:
30-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v3
3132

3233
- name: Build system information
3334
run: python3 .github/workflows/system-info.py

.github/workflows/test-windows.yml

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Test Windows
22

3-
on: [push, pull_request]
3+
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
66
build:
7-
runs-on: windows-2019
7+
runs-on: windows-latest
88
strategy:
99
fail-fast: false
1010
matrix:
@@ -23,30 +23,22 @@ jobs:
2323

2424
steps:
2525
- name: Checkout Pillow
26-
uses: actions/checkout@v2
26+
uses: actions/checkout@v3
2727

2828
- name: Checkout cached dependencies
29-
uses: actions/checkout@v2
29+
uses: actions/checkout@v3
3030
with:
3131
repository: python-pillow/pillow-depends
3232
path: winbuild\depends
3333

34-
- name: Cache pip
35-
uses: actions/cache@v2
36-
with:
37-
path: ~\AppData\Local\pip\Cache
38-
key:
39-
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.architecture }}-${{ hashFiles('**/.github/workflows/test-windows.yml') }}
40-
restore-keys: |
41-
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.architecture }}-
42-
${{ runner.os }}-${{ matrix.python-version }}-
43-
4434
# sets env: pythonLocation
4535
- name: Set up Python
46-
uses: actions/setup-python@v2
36+
uses: actions/setup-python@v3
4737
with:
4838
python-version: ${{ matrix.python-version }}
4939
architecture: ${{ matrix.architecture }}
40+
cache: pip
41+
cache-dependency-path: ".github/workflows/test-windows.yml"
5042

5143
- name: Print build system information
5244
run: python .github/workflows/system-info.py
@@ -60,8 +52,8 @@ jobs:
6052
7z x winbuild\depends\nasm-2.15.05-win64.zip "-o$env:RUNNER_WORKSPACE\"
6153
echo "$env:RUNNER_WORKSPACE\nasm-2.15.05" >> $env:GITHUB_PATH
6254
63-
winbuild\depends\gs9550w32.exe /S
64-
echo "C:\Program Files (x86)\gs\gs9.55.0\bin" >> $env:GITHUB_PATH
55+
winbuild\depends\gs9561w32.exe /S
56+
echo "C:\Program Files (x86)\gs\gs9.56.1\bin" >> $env:GITHUB_PATH
6557
6658
xcopy /S /Y winbuild\depends\test_images\* Tests\images\
6759
@@ -140,15 +132,16 @@ jobs:
140132
- name: Build Pillow
141133
run: |
142134
$FLAGS=""
143-
if ('${{ github.event_name }}' -eq 'push') { $FLAGS="--disable-imagequant" }
135+
if ('${{ github.event_name }}' -ne 'pull_request') { $FLAGS="--disable-imagequant" }
144136
& winbuild\build\build_pillow.cmd $FLAGS install
145137
& $env:pythonLocation\python.exe selftest.py --installed
146138
shell: pwsh
147139

148-
# failing with PyPy3
140+
# skip PyPy for speed
149141
- name: Enable heap verification
150142
if: "!contains(matrix.python-version, 'pypy')"
151-
run: "& 'C:\\Program Files (x86)\\Windows Kits\\10\\Debuggers\\x86\\gflags.exe' /p /enable $env:pythonLocation\\python.exe"
143+
run: |
144+
& reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\python.exe" /v "GlobalFlag" /t REG_SZ /d "0x02000000" /f
152145
153146
- name: Test Pillow
154147
run: |
@@ -163,7 +156,7 @@ jobs:
163156
shell: bash
164157

165158
- name: Upload errors
166-
uses: actions/upload-artifact@v2
159+
uses: actions/upload-artifact@v3
167160
if: failure()
168161
with:
169162
name: errors
@@ -183,14 +176,14 @@ jobs:
183176

184177
- name: Build wheel
185178
id: wheel
186-
if: "github.event_name == 'push'"
179+
if: "github.event_name != 'pull_request'"
187180
run: |
188181
for /f "tokens=3 delims=/" %%a in ("${{ github.ref }}") do echo ::set-output name=dist::dist-%%a
189182
winbuild\\build\\build_pillow.cmd --disable-imagequant bdist_wheel
190183
shell: cmd
191184

192-
- uses: actions/upload-artifact@v2
193-
if: "github.event_name == 'push'"
185+
- uses: actions/upload-artifact@v3
186+
if: "github.event_name != 'pull_request'"
194187
with:
195188
name: ${{ steps.wheel.outputs.dist }}
196189
path: dist\*.whl

0 commit comments

Comments
 (0)