Skip to content

Commit 786ded0

Browse files
authored
Merge pull request #7880 from radarhere/cygwin
2 parents ec3cf2c + e2986e1 commit 786ded0

2 files changed

Lines changed: 5 additions & 17 deletions

File tree

.github/workflows/test-cygwin.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
uses: actions/checkout@v4
5151

5252
- name: Install Cygwin
53-
uses: egor-tensin/setup-cygwin@v4
53+
uses: cygwin/cygwin-install-action@v4
5454
with:
5555
packages: >
5656
gcc-g++
@@ -71,7 +71,6 @@ jobs:
7171
make
7272
netpbm
7373
perl
74-
python39=3.9.16-1
7574
python3${{ matrix.python-minor-version }}-cffi
7675
python3${{ matrix.python-minor-version }}-cython
7776
python3${{ matrix.python-minor-version }}-devel
@@ -89,21 +88,15 @@ jobs:
8988

9089
- name: Select Python version
9190
run: |
92-
ln -sf c:/tools/cygwin/bin/python3.${{ matrix.python-minor-version }} c:/tools/cygwin/bin/python3
93-
94-
- name: Get latest NumPy version
95-
id: latest-numpy
96-
shell: bash.exe -eo pipefail -o igncr "{0}"
97-
run: |
98-
python3 -m pip list --outdated | grep numpy | sed -r 's/ +/ /g' | cut -d ' ' -f 3 | sed 's/^/version=/' >> $GITHUB_OUTPUT
91+
ln -sf c:/cygwin/bin/python3.${{ matrix.python-minor-version }} c:/cygwin/bin/python3
9992
10093
- name: pip cache
10194
uses: actions/cache@v4
10295
with:
10396
path: 'C:\cygwin\home\runneradmin\.cache\pip'
104-
key: ${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-numpy${{ steps.latest-numpy.outputs.version }}-${{ hashFiles('.ci/install.sh') }}
97+
key: ${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-${{ hashFiles('.ci/install.sh') }}
10598
restore-keys: |
106-
${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-numpy${{ steps.latest-numpy.outputs.version }}-
99+
${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-
107100
108101
- name: Build system information
109102
run: |
@@ -113,11 +106,6 @@ jobs:
113106
run: |
114107
bash.exe .ci/install.sh
115108
116-
- name: Upgrade NumPy
117-
shell: dash.exe -l "{0}"
118-
run: |
119-
python3 -m pip install -U "numpy<1.26"
120-
121109
- name: Build
122110
shell: bash.exe -eo pipefail -o igncr "{0}"
123111
run: |

src/PIL/Image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ def __array_interface__(self):
702702
pass
703703
else:
704704
if parse_version(numpy.__version__) < parse_version("1.23"):
705-
warnings.warn(e)
705+
warnings.warn(str(e))
706706
raise
707707
new["shape"], new["typestr"] = _conv_type_shape(self)
708708
return new

0 commit comments

Comments
 (0)