Skip to content

Commit 2753057

Browse files
authored
Merge pull request #7644 from radarhere/import
2 parents 8afedb7 + b22e471 commit 2753057

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

Tests/oss-fuzz/test_fuzzers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import packaging
88
import pytest
99

10-
from PIL import Image, features
10+
from PIL import Image, UnidentifiedImageError, features
1111
from Tests.helper import skip_unless_feature
1212

1313
if sys.platform.startswith("win32"):
@@ -43,7 +43,7 @@ def test_fuzz_images(path: str) -> None:
4343
except (
4444
Image.DecompressionBombError,
4545
Image.DecompressionBombWarning,
46-
Image.UnidentifiedImageError,
46+
UnidentifiedImageError,
4747
):
4848
# Known Image.* exceptions
4949
assert True

Tests/test_file_eps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import pytest
77

8-
from PIL import EpsImagePlugin, Image, features
8+
from PIL import EpsImagePlugin, Image, UnidentifiedImageError, features
99

1010
from .helper import (
1111
assert_image_similar,
@@ -419,7 +419,7 @@ def test_emptyline() -> None:
419419
)
420420
def test_timeout(test_file: str) -> None:
421421
with open(test_file, "rb") as f:
422-
with pytest.raises(Image.UnidentifiedImageError):
422+
with pytest.raises(UnidentifiedImageError):
423423
with Image.open(f):
424424
pass
425425

Tests/test_file_psd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import pytest
66

7-
from PIL import Image, PsdImagePlugin
7+
from PIL import Image, PsdImagePlugin, UnidentifiedImageError
88

99
from .helper import assert_image_equal_tofile, assert_image_similar, hopper, is_pypy
1010

@@ -152,11 +152,11 @@ def test_combined_larger_than_size() -> None:
152152
[
153153
(
154154
"Tests/images/timeout-1ee28a249896e05b83840ae8140622de8e648ba9.psd",
155-
Image.UnidentifiedImageError,
155+
UnidentifiedImageError,
156156
),
157157
(
158158
"Tests/images/timeout-598843abc37fc080ec36a2699ebbd44f795d3a6f.psd",
159-
Image.UnidentifiedImageError,
159+
UnidentifiedImageError,
160160
),
161161
("Tests/images/timeout-c8efc3fded6426986ba867a399791bae544f59bc.psd", OSError),
162162
("Tests/images/timeout-dedc7a4ebd856d79b4359bbcc79e8ef231ce38f6.psd", OSError),

src/PIL/ImageCms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from functools import reduce
2626
from typing import Any
2727

28-
from . import Image
28+
from . import Image, __version__
2929
from ._deprecate import deprecate
3030

3131
try:
@@ -1087,4 +1087,4 @@ def versions():
10871087
12,
10881088
'(PIL.features.version("littlecms2"), sys.version, PIL.__version__)',
10891089
)
1090-
return _VERSION, core.littlecms_version, sys.version.split()[0], Image.__version__
1090+
return _VERSION, core.littlecms_version, sys.version.split()[0], __version__

0 commit comments

Comments
 (0)