Skip to content

Commit 556dd1e

Browse files
authored
Merge pull request #7535 from hugovk/add-3.13
2 parents 9b8c23e + 9b88cf5 commit 556dd1e

File tree

6 files changed

+17
-11
lines changed

6 files changed

+17
-11
lines changed

.ci/install.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ fi
2828

2929
python3 -m pip install --upgrade pip
3030
python3 -m pip install --upgrade wheel
31-
PYTHONOPTIMIZE=0 python3 -m pip install cffi
31+
# TODO Update condition when cffi supports 3.13
32+
if ! [[ "$GHA_PYTHON_VERSION" == "3.13" ]]; then PYTHONOPTIMIZE=0 python3 -m pip install cffi ; fi
3233
python3 -m pip install coverage
3334
python3 -m pip install defusedxml
3435
python3 -m pip install olefile
@@ -38,7 +39,8 @@ python3 -m pip install -U pytest-timeout
3839
python3 -m pip install pyroma
3940

4041
if [[ $(uname) != CYGWIN* ]]; then
41-
python3 -m pip install numpy
42+
# TODO Update condition when NumPy supports 3.13
43+
if ! [[ "$GHA_PYTHON_VERSION" == "3.13" ]]; then python3 -m pip install numpy ; fi
4244

4345
# PyQt6 doesn't support PyPy3
4446
if [[ $GHA_PYTHON_VERSION == 3.* ]]; then

.github/workflows/macos-install.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ set -e
55
brew install libtiff libjpeg openjpeg libimagequant webp little-cms2 freetype libraqm
66
export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig"
77

8-
PYTHONOPTIMIZE=0 python3 -m pip install cffi
8+
# TODO Update condition when cffi supports 3.13
9+
if ! [[ "$GHA_PYTHON_VERSION" == "3.13" ]]; then PYTHONOPTIMIZE=0 python3 -m pip install cffi ; fi
10+
911
python3 -m pip install coverage
1012
python3 -m pip install defusedxml
1113
python3 -m pip install olefile
@@ -14,7 +16,8 @@ python3 -m pip install -U pytest-cov
1416
python3 -m pip install -U pytest-timeout
1517
python3 -m pip install pyroma
1618

17-
python3 -m pip install numpy
19+
# TODO Update condition when NumPy supports 3.13
20+
if ! [[ "$GHA_PYTHON_VERSION" == "3.13" ]]; then python3 -m pip install numpy ; fi
1821

1922
# extra test images
2023
pushd depends && ./install_extra_test_images.sh && popd

.github/workflows/test-windows.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
python-version: ["pypy3.10", "pypy3.9", "3.8", "3.9", "3.10", "3.11", "3.12"]
35+
python-version: ["pypy3.10", "pypy3.9", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
3636

3737
timeout-minutes: 30
3838

@@ -59,6 +59,7 @@ jobs:
5959
uses: actions/setup-python@v4
6060
with:
6161
python-version: ${{ matrix.python-version }}
62+
allow-prereleases: true
6263
cache: pip
6364
cache-dependency-path: ".github/workflows/test-windows.yml"
6465

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
python-version: [
4242
"pypy3.10",
4343
"pypy3.9",
44+
"3.13",
4445
"3.12",
4546
"3.11",
4647
"3.10",
@@ -64,6 +65,7 @@ jobs:
6465
uses: actions/setup-python@v4
6566
with:
6667
python-version: ${{ matrix.python-version }}
68+
allow-prereleases: true
6769
cache: pip
6870
cache-dependency-path: ".ci/*.sh"
6971

src/libImaging/TiffDecode.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
#ifdef HAVE_LIBTIFF
1616

17+
#ifdef HAVE_UNISTD_H
18+
#include <unistd.h> /* lseek */
19+
#endif
20+
1721
#ifndef uint
1822
#define uint uint32
1923
#endif

src/libImaging/TiffDecode.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@
1313
#include <tiff.h>
1414
#endif
1515

16-
/* UNDONE -- what are we using from this? */
17-
/*#ifndef _UNISTD_H
18-
# include <unistd.h>
19-
# endif
20-
*/
21-
2216
#ifndef min
2317
#define min(x, y) ((x > y) ? y : x)
2418
#define max(x, y) ((x < y) ? y : x)

0 commit comments

Comments
 (0)