Skip to content

Commit b84ff7c

Browse files
committed
Merge branch 'main' into has_characters
2 parents bb73d3a + a865345 commit b84ff7c

13 files changed

Lines changed: 34 additions & 40 deletions

File tree

.ci/requirements-cibw.txt

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

.github/workflows/cifuzz.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ jobs:
4747
language: python
4848
dry-run: false
4949
- name: Upload New Crash
50-
uses: actions/upload-artifact@v6
50+
uses: actions/upload-artifact@v7
5151
if: failure() && steps.build.outcome == 'success'
5252
with:
5353
name: artifacts
5454
path: ./out/artifacts
5555
- name: Upload Legacy Crash
56-
uses: actions/upload-artifact@v6
56+
uses: actions/upload-artifact@v7
5757
if: steps.run.outcome == 'success'
5858
with:
5959
name: crash

.github/workflows/release-drafter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
# Drafts your next release notes as pull requests are merged into "main"
29-
- uses: release-drafter/release-drafter@v6
29+
- uses: release-drafter/release-drafter@v7
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676

7777
- name: Set up QEMU
7878
if: "matrix.qemu-arch"
79-
uses: docker/setup-qemu-action@v3
79+
uses: docker/setup-qemu-action@v4
8080
with:
8181
platforms: ${{ matrix.qemu-arch }}
8282

@@ -104,7 +104,7 @@ jobs:
104104
.ci/after_success.sh
105105
106106
- name: Upload coverage
107-
uses: codecov/codecov-action@v5
107+
uses: codecov/codecov-action@v6
108108
with:
109109
flags: GHA_Docker
110110
name: ${{ matrix.docker }}

.github/workflows/test-mingw.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
.ci/test.sh
8888
8989
- name: Upload coverage
90-
uses: codecov/codecov-action@v5
90+
uses: codecov/codecov-action@v6
9191
with:
9292
files: ./coverage.xml
9393
flags: GHA_Windows

.github/workflows/test-windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ jobs:
217217
shell: bash
218218

219219
- name: Upload errors
220-
uses: actions/upload-artifact@v6
220+
uses: actions/upload-artifact@v7
221221
if: failure()
222222
with:
223223
name: errors
@@ -229,7 +229,7 @@ jobs:
229229
shell: pwsh
230230

231231
- name: Upload coverage
232-
uses: codecov/codecov-action@v5
232+
uses: codecov/codecov-action@v6
233233
with:
234234
files: ./coverage.xml
235235
flags: GHA_Windows

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ jobs:
162162
mkdir -p Tests/errors
163163
164164
- name: Upload errors
165-
uses: actions/upload-artifact@v6
165+
uses: actions/upload-artifact@v7
166166
if: failure()
167167
with:
168168
name: errors
@@ -173,7 +173,7 @@ jobs:
173173
.ci/after_success.sh
174174
175175
- name: Upload coverage
176-
uses: codecov/codecov-action@v5
176+
uses: codecov/codecov-action@v6
177177
with:
178178
flags: ${{ matrix.os == 'ubuntu-latest' && 'GHA_Ubuntu' || 'GHA_macOS' }}
179179
name: ${{ matrix.os }} Python ${{ matrix.python-version }}

.github/workflows/wheels.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ concurrency:
3939
cancel-in-progress: true
4040

4141
env:
42-
EXPECTED_DISTS: 75
42+
EXPECTED_DISTS: 66
4343
FORCE_COLOR: 1
4444

4545
jobs:
@@ -127,10 +127,10 @@ jobs:
127127
CIBW_PLATFORM: ${{ matrix.platform }}
128128
CIBW_ARCHS: ${{ matrix.cibw_arch }}
129129
CIBW_BUILD: ${{ matrix.build }}
130-
CIBW_ENABLE: cpython-prerelease cpython-freethreading pypy
130+
CIBW_ENABLE: cpython-prerelease pypy
131131
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx_deployment_target }}
132132

133-
- uses: actions/upload-artifact@v6
133+
- uses: actions/upload-artifact@v7
134134
with:
135135
name: dist-${{ matrix.name }}
136136
path: ./wheelhouse/*.whl
@@ -198,7 +198,7 @@ jobs:
198198
CIBW_ARCHS: ${{ matrix.cibw_arch }}
199199
CIBW_BEFORE_ALL: "{package}\\winbuild\\build\\build_dep_all.cmd"
200200
CIBW_CACHE_PATH: "C:\\cibw"
201-
CIBW_ENABLE: cpython-prerelease cpython-freethreading pypy
201+
CIBW_ENABLE: cpython-prerelease pypy
202202
CIBW_TEST_SKIP: "*-win_arm64"
203203
CIBW_TEST_COMMAND: 'docker run --rm
204204
-v {project}:C:\pillow
@@ -210,13 +210,13 @@ jobs:
210210
shell: bash
211211

212212
- name: Upload wheels
213-
uses: actions/upload-artifact@v6
213+
uses: actions/upload-artifact@v7
214214
with:
215215
name: dist-windows-${{ matrix.cibw_arch }}
216216
path: ./wheelhouse/*.whl
217217

218218
- name: Upload fribidi.dll
219-
uses: actions/upload-artifact@v6
219+
uses: actions/upload-artifact@v7
220220
with:
221221
name: fribidi-windows-${{ matrix.cibw_arch }}
222222
path: winbuild\build\bin\fribidi*
@@ -236,7 +236,7 @@ jobs:
236236

237237
- run: make sdist
238238

239-
- uses: actions/upload-artifact@v6
239+
- uses: actions/upload-artifact@v7
240240
with:
241241
name: dist-sdist
242242
path: dist/*.tar.gz

Tests/test_file_jpeg2k.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ def test_default_num_resolutions(
178178

179179
def test_reduce() -> None:
180180
with Image.open("Tests/images/test-card-lossless.jp2") as im:
181-
assert callable(im.reduce)
181+
assert isinstance(im, Jpeg2KImagePlugin.Jpeg2KImageFile)
182182

183-
im.reduce = 2 # type: ignore[assignment, method-assign]
183+
im.reduce = 2
184184
assert im.reduce == 2
185185

186186
im.load()

Tests/test_file_png.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import sys
55
import warnings
66
import zlib
7-
from io import BytesIO
7+
from io import BytesIO, TextIOWrapper
88
from pathlib import Path
99
from types import ModuleType
1010
from typing import Any, cast
@@ -821,19 +821,15 @@ def test_seek(self) -> None:
821821
@pytest.mark.parametrize("buffer", (True, False))
822822
def test_save_stdout(self, buffer: bool, monkeypatch: pytest.MonkeyPatch) -> None:
823823

824-
class MyStdOut:
825-
buffer = BytesIO()
826-
827-
mystdout: MyStdOut | BytesIO = MyStdOut() if buffer else BytesIO()
824+
fp = BytesIO()
825+
mystdout = TextIOWrapper(fp) if buffer else fp
828826

829827
monkeypatch.setattr(sys, "stdout", mystdout)
830828

831829
with Image.open(TEST_PNG_FILE) as im:
832830
im.save(sys.stdout, "PNG") # type: ignore[arg-type]
833831

834-
if isinstance(mystdout, MyStdOut):
835-
mystdout = mystdout.buffer
836-
with Image.open(mystdout) as reloaded:
832+
with Image.open(fp) as reloaded:
837833
assert_image_equal_tofile(reloaded, TEST_PNG_FILE)
838834

839835
def test_truncated_end_chunk(self, monkeypatch: pytest.MonkeyPatch) -> None:

0 commit comments

Comments
 (0)