From f5264e6ec4b01d72ba1b4cbb0ee3db8cae0e6788 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Fri, 17 Jul 2026 21:57:00 +1000 Subject: [PATCH] Remove support for NumPy < 1.23 --- Tests/test_image_array.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Tests/test_image_array.py b/Tests/test_image_array.py index f5ca2b6b25f..d4fa9cea686 100644 --- a/Tests/test_image_array.py +++ b/Tests/test_image_array.py @@ -3,7 +3,6 @@ from typing import Any import pytest -from packaging.version import parse as parse_version from PIL import Image @@ -44,12 +43,8 @@ def test_with_dtype(dtype: npt.DTypeLike) -> None: test_with_dtype(numpy.uint8) with Image.open("Tests/images/truncated_jpeg.jpg") as im_truncated: - if parse_version(numpy.__version__) >= parse_version("1.23"): - with pytest.raises(OSError): - numpy.array(im_truncated) - else: - with pytest.warns(DeprecationWarning, match="__array_interface__"): - numpy.array(im_truncated) + with pytest.raises(OSError): + numpy.array(im_truncated) def test_fromarray() -> None: