Skip to content

Commit 9525553

Browse files
committed
Merge branch 'main' into type_hints
2 parents 2515938 + 1b67239 commit 9525553

11 files changed

Lines changed: 56 additions & 33 deletions

File tree

.github/workflows/release-drafter.yml

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

.github/workflows/test-cygwin.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949
- name: Install Cygwin
5050
uses: egor-tensin/setup-cygwin@v4
5151
with:
52-
platform: x86_64
5352
packages: >
5453
gcc-g++
5554
ghostscript
@@ -81,7 +80,7 @@ jobs:
8180
zlib-devel
8281
8382
- name: Add Lapack to PATH
84-
uses: egor-tensin/cleanup-path@v3
83+
uses: egor-tensin/cleanup-path@v4
8584
with:
8685
dirs: 'C:\cygwin\bin;C:\cygwin\lib\lapack'
8786

@@ -142,7 +141,7 @@ jobs:
142141
bash.exe .ci/after_success.sh
143142
144143
- name: Upload coverage
145-
uses: codecov/codecov-action@v3
144+
uses: codecov/codecov-action@v3.1.5
146145
with:
147146
file: ./coverage.xml
148147
flags: GHA_Cygwin

.github/workflows/test-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
MATRIX_DOCKER: ${{ matrix.docker }}
102102

103103
- name: Upload coverage
104-
uses: codecov/codecov-action@v3
104+
uses: codecov/codecov-action@v3.1.5
105105
with:
106106
flags: GHA_Docker
107107
name: ${{ matrix.docker }}

.github/workflows/test-mingw.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
python3 -m pytest -vx --cov PIL --cov Tests --cov-report term --cov-report xml Tests
8383
8484
- name: Upload coverage
85-
uses: codecov/codecov-action@v3
85+
uses: codecov/codecov-action@v3.1.5
8686
with:
8787
file: ./coverage.xml
8888
flags: GHA_Windows

.github/workflows/test-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ jobs:
202202
shell: pwsh
203203

204204
- name: Upload coverage
205-
uses: codecov/codecov-action@v3
205+
uses: codecov/codecov-action@v3.1.5
206206
with:
207207
file: ./coverage.xml
208208
flags: GHA_Windows

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
.ci/after_success.sh
150150
151151
- name: Upload coverage
152-
uses: codecov/codecov-action@v3
152+
uses: codecov/codecov-action@v3.1.5
153153
with:
154154
flags: ${{ matrix.os == 'ubuntu-latest' && 'GHA_Ubuntu' || 'GHA_macOS' }}
155155
name: ${{ matrix.os }} Python ${{ matrix.python-version }}

.github/workflows/wheels-dependencies.sh

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,11 @@ function build {
7272

7373
build_simple xcb-proto 1.16.0 https://xorg.freedesktop.org/archive/individual/proto
7474
if [ -n "$IS_MACOS" ]; then
75-
if [[ "$CIBW_ARCHS" == "arm64" ]]; then
76-
build_simple xorgproto 2023.2 https://www.x.org/pub/individual/proto
77-
build_simple libXau 1.0.11 https://www.x.org/pub/individual/lib
78-
build_simple libpthread-stubs 0.5 https://xcb.freedesktop.org/dist
79-
if [ -f /Library/Frameworks/Python.framework/Versions/Current/share/pkgconfig/xcb-proto.pc ]; then
80-
cp /Library/Frameworks/Python.framework/Versions/Current/share/pkgconfig/xcb-proto.pc /Library/Frameworks/Python.framework/Versions/Current/lib/pkgconfig/xcb-proto.pc
81-
fi
75+
build_simple xorgproto 2023.2 https://www.x.org/pub/individual/proto
76+
build_simple libXau 1.0.11 https://www.x.org/pub/individual/lib
77+
build_simple libpthread-stubs 0.5 https://xcb.freedesktop.org/dist
78+
if [ -f /Library/Frameworks/Python.framework/Versions/Current/share/pkgconfig/xcb-proto.pc ]; then
79+
cp /Library/Frameworks/Python.framework/Versions/Current/share/pkgconfig/xcb-proto.pc /Library/Frameworks/Python.framework/Versions/Current/lib/pkgconfig/xcb-proto.pc
8280
fi
8381
else
8482
sed s/\${pc_sysrootdir\}// /usr/local/share/pkgconfig/xcb-proto.pc > /usr/local/lib/pkgconfig/xcb-proto.pc
@@ -131,13 +129,13 @@ untar pillow-depends-main.zip
131129

132130
if [[ -n "$IS_MACOS" ]]; then
133131
# webp, libtiff, libxcb cause a conflict with building webp, libtiff, libxcb
134-
# libxdmcp causes an issue on macOS < 11
132+
# libxau and libxdmcp cause an issue on macOS < 11
135133
# if php is installed, brew tries to reinstall these after installing openblas
136134
# remove cairo to fix building harfbuzz on arm64
137135
# remove lcms2 and libpng to fix building openjpeg on arm64
138136
# remove zstd to avoid inclusion on x86_64
139137
# curl from brew requires zstd, use system curl
140-
brew remove --ignore-dependencies webp libpng libtiff libxcb libxdmcp curl php cairo lcms2 ghostscript zstd
138+
brew remove --ignore-dependencies webp libpng libtiff libxcb libxau libxdmcp curl php cairo lcms2 ghostscript zstd
141139

142140
brew install pkg-config
143141
fi

CHANGES.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ Changelog (Pillow)
55
10.3.0 (unreleased)
66
-------------------
77

8+
- Update wl-paste handling and return None for some errors in grabclipboard() on Linux #7745
9+
[nik012003, radarhere]
10+
11+
- Remove execute bit from ``setup.py`` #7760
12+
[hugovk]
13+
814
- Do not support using test-image-results to upload images after test failures #7739
915
[radarhere]
1016

Tests/test_imagegrab.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,15 @@ def test_grabclipboard_wl_clipboard(self, ext) -> None:
119119
subprocess.call(["wl-copy"], stdin=fp)
120120
im = ImageGrab.grabclipboard()
121121
assert_image_equal_tofile(im, image_path)
122+
123+
@pytest.mark.skipif(
124+
(
125+
sys.platform != "linux"
126+
or not all(shutil.which(cmd) for cmd in ("wl-paste", "wl-copy"))
127+
),
128+
reason="Linux with wl-clipboard only",
129+
)
130+
@pytest.mark.parametrize("arg", ("text", "--clear"))
131+
def test_grabclipboard_wl_clipboard_errors(self, arg):
132+
subprocess.call(["wl-copy", arg])
133+
assert ImageGrab.grabclipboard() is None

src/PIL/ImageFile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def _tilesort(t):
9191

9292

9393
class _Tile(NamedTuple):
94-
encoder_name: str
94+
codec_name: str
9595
extents: tuple[int, int, int, int]
9696
offset: int
9797
args: tuple[Any, ...] | str | None

0 commit comments

Comments
 (0)