Skip to content

Commit

Permalink
Merge branch 'main' into xmp
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere authored Dec 17, 2024
2 parents 203ca12 + 88f6be3 commit 0ca832c
Show file tree
Hide file tree
Showing 80 changed files with 955 additions and 337 deletions.
2 changes: 1 addition & 1 deletion .ci/requirements-cibw.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cibuildwheel==2.21.3
cibuildwheel==2.22.0
2 changes: 1 addition & 1 deletion .ci/requirements-mypy.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mypy==1.12.0
mypy==1.13.0
IceSpringPySideStubs-PyQt6
IceSpringPySideStubs-PySide6
ipython
Expand Down
1 change: 0 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Please send a pull request to the `main` branch. Please include [documentation](
- Follow PEP 8.
- When committing only documentation changes please include `[ci skip]` in the commit message to avoid running tests on AppVeyor.
- 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.
- 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.

## Reporting Issues

Expand Down
11 changes: 5 additions & 6 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ tag-template: "$NEXT_MINOR_VERSION"
change-template: '- $TITLE #$NUMBER [@$AUTHOR]'

categories:
- title: "Dependencies"
label: "Dependency"
- title: "Removals"
label: "Removal"
- title: "Deprecations"
label: "Deprecation"
- title: "Documentation"
label: "Documentation"
- title: "Removals"
label: "Removal"
- title: "Dependencies"
label: "Dependency"
- title: "Testing"
label: "Testing"
- title: "Type hints"
label: "Type hints"
- title: "Other changes"

exclude-labels:
- "changelog: skip"
Expand All @@ -23,6 +24,4 @@ template: |
https://pillow.readthedocs.io/en/stable/releasenotes/$NEXT_MINOR_VERSION.html
## Changes
$CHANGES
12 changes: 8 additions & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
"config:recommended"
],
"labels": [
"Dependency"
],
"packageRules": [
{
"groupName": "github-actions",
"matchManagers": ["github-actions"],
"separateMajorMinor": "false"
"matchManagers": [
"github-actions"
],
"separateMajorMinor": false
}
],
"schedule": ["on the 3rd day of the month"]
"schedule": [
"on the 3rd day of the month"
]
}
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v5
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: pre-commit cache
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ fi
brew install \
freetype \
ghostscript \
jpeg-turbo \
libimagequant \
libjpeg \
libtiff \
little-cms2 \
openjpeg \
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

permissions:
issues: write
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -15,6 +15,8 @@ concurrency:
jobs:
stale:
if: github.repository_owner == 'python-pillow'
permissions:
issues: write

runs-on: ubuntu-latest

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test-cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
- name: Checkout Pillow
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install Cygwin
uses: cygwin/cygwin-install-action@v4
Expand Down Expand Up @@ -131,11 +133,12 @@ jobs:
- name: After success
run: |
bash.exe .ci/after_success.sh
rm C:\cygwin\bin\bash.EXE
- name: Upload coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
file: ./coverage.xml
files: ./coverage.xml
flags: GHA_Cygwin
name: Cygwin Python 3.${{ matrix.python-minor-version }}
token: ${{ secrets.CODECOV_ORG_TOKEN }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
debian-12-bookworm-x86,
debian-12-bookworm-amd64,
fedora-40-amd64,
fedora-41-amd64,
gentoo,
ubuntu-22.04-jammy-amd64,
ubuntu-24.04-noble-amd64,
Expand All @@ -64,6 +65,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Build system information
run: python3 .github/workflows/system-info.py
Expand Down Expand Up @@ -97,11 +100,10 @@ jobs:
MATRIX_DOCKER: ${{ matrix.docker }}

- name: Upload coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
flags: GHA_Docker
name: ${{ matrix.docker }}
gcov: true
token: ${{ secrets.CODECOV_ORG_TOKEN }}

success:
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/test-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
steps:
- name: Checkout Pillow
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up shell
run: echo "C:\msys64\usr\bin\" >> $env:GITHUB_PATH
Expand All @@ -66,26 +68,26 @@ jobs:
mingw-w64-x86_64-openjpeg2 \
mingw-w64-x86_64-python3-numpy \
mingw-w64-x86_64-python3-olefile \
mingw-w64-x86_64-python3-setuptools \
mingw-w64-x86_64-python3-pip \
mingw-w64-x86_64-python-pytest \
mingw-w64-x86_64-python-pytest-cov \
mingw-w64-x86_64-python-pytest-timeout \
mingw-w64-x86_64-python-pyqt6
python3 -m ensurepip
python3 -m pip install pyroma pytest pytest-cov pytest-timeout
pushd depends && ./install_extra_test_images.sh && popd
- name: Build Pillow
run: SETUPTOOLS_USE_DISTUTILS="stdlib" CFLAGS="-coverage" python3 -m pip install .
run: CFLAGS="-coverage" python3 -m pip install .

- name: Test Pillow
run: |
python3 selftest.py --installed
.ci/test.sh
- name: Upload coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
file: ./coverage.xml
files: ./coverage.xml
flags: GHA_Windows
name: "MSYS2 MinGW"
token: ${{ secrets.CODECOV_ORG_TOKEN }}
2 changes: 2 additions & 0 deletions .github/workflows/test-valgrind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Build system information
run: python3 .github/workflows/system-info.py
Expand Down
28 changes: 15 additions & 13 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,20 @@ jobs:
steps:
- name: Checkout Pillow
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Checkout cached dependencies
uses: actions/checkout@v4
with:
persist-credentials: false
repository: python-pillow/pillow-depends
path: winbuild\depends

- name: Checkout extra test images
uses: actions/checkout@v4
with:
persist-credentials: false
repository: python-pillow/test-images
path: Tests\test-images

Expand All @@ -69,16 +73,14 @@ jobs:
- name: Print build system information
run: python3 .github/workflows/system-info.py

- name: Install Python dependencies
run: >
python3 -m pip install
coverage>=7.4.2
defusedxml
olefile
pyroma
pytest
pytest-cov
pytest-timeout
- name: Upgrade pip
run: |
python3 -m pip install --upgrade pip
- name: Install CPython dependencies
if: "!contains(matrix.python-version, 'pypy')"
run: |
python3 -m pip install PyQt6
- name: Install dependencies
id: install
Expand Down Expand Up @@ -178,7 +180,7 @@ jobs:
- name: Build Pillow
run: |
$FLAGS="-C raqm=vendor -C fribidi=vendor"
cmd /c "winbuild\build\build_env.cmd && $env:pythonLocation\python.exe -m pip install -v $FLAGS ."
cmd /c "winbuild\build\build_env.cmd && $env:pythonLocation\python.exe -m pip install -v $FLAGS .[tests]"
& $env:pythonLocation\python.exe selftest.py --installed
shell: pwsh

Expand Down Expand Up @@ -213,9 +215,9 @@ jobs:
shell: pwsh

- name: Upload coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
file: ./coverage.xml
files: ./coverage.xml
flags: GHA_Windows
name: ${{ runner.os }} Python ${{ matrix.python-version }}
token: ${{ secrets.CODECOV_ORG_TOKEN }}
Expand Down
22 changes: 8 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
]
python-version: [
"pypy3.10",
"3.13t",
"3.13",
"3.12",
"3.11",
Expand All @@ -52,21 +53,22 @@ jobs:
- { python-version: "3.11", PYTHONOPTIMIZE: 1, REVERSE: "--reverse" }
- { python-version: "3.10", PYTHONOPTIMIZE: 2 }
# Free-threaded
- { os: "ubuntu-latest", python-version: "3.13-dev", disable-gil: true }
- { python-version: "3.13t", disable-gil: true }
# M1 only available for 3.10+
- { os: "macos-13", python-version: "3.9" }
exclude:
- { os: "macos-latest", python-version: "3.9" }

runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }} ${{ matrix.disable-gil && 'free-threaded' || '' }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }}

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
if: "${{ !matrix.disable-gil }}"
uses: Quansight-Labs/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
Expand All @@ -75,13 +77,6 @@ jobs:
".ci/*.sh"
"pyproject.toml"
- name: Set up Python ${{ matrix.python-version }} (free-threaded)
uses: deadsnakes/[email protected]
if: "${{ matrix.disable-gil }}"
with:
python-version: ${{ matrix.python-version }}
nogil: ${{ matrix.disable-gil }}

- name: Set PYTHON_GIL
if: "${{ matrix.disable-gil }}"
run: |
Expand Down Expand Up @@ -114,7 +109,7 @@ jobs:
GHA_PYTHON_VERSION: ${{ matrix.python-version }}

- name: Register gcc problem matcher
if: "matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'"
if: "matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'"
run: echo "::add-matcher::.github/problem-matchers/gcc.json"

- name: Build
Expand Down Expand Up @@ -154,11 +149,10 @@ jobs:
.ci/after_success.sh
- name: Upload coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
flags: ${{ matrix.os == 'ubuntu-latest' && 'GHA_Ubuntu' || 'GHA_macOS' }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
gcov: true
token: ${{ secrets.CODECOV_ORG_TOKEN }}

success:
Expand Down
Loading

0 comments on commit 0ca832c

Please sign in to comment.