Skip to content

Commit 36a55fc

Browse files
authored
Replace pillow-heif with pi-heif (#399)
1 parent a90f38f commit 36a55fc

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

pyproject.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ target = ["test", "roboflow"]
77
tests = ["B201", "B301"]
88

99
[tool.ruff]
10-
target-version = "py38"
10+
target-version = "py39"
1111
line-length = 120
1212

1313
[tool.ruff.lint]
@@ -45,6 +45,7 @@ ignore = [
4545
"T",
4646
"TD",
4747
"TRY",
48+
"UP",
4849
]
4950

5051
# Exclude a variety of commonly ignored directories.
@@ -100,7 +101,7 @@ banned-module-level-imports = [
100101
]
101102

102103
[tool.mypy]
103-
python_version = "3.8"
104+
python_version = "3.9"
104105
exclude = ["^build/"]
105106

106107
[[tool.mypy.overrides]]
@@ -111,9 +112,6 @@ module = [
111112
"IPython.display.*",
112113
# ipywidgets is an optional dependency
113114
"ipywidgets.*",
114-
# matplotlib typing is not available for Python 3.8
115-
# remove this when we stop supporting Python 3.8
116-
"matplotlib.*",
117115
"requests_toolbelt.*",
118116
"torch.*",
119117
"ultralytics.*",

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ numpy>=1.18.5
77
opencv-python-headless==4.10.0.84
88
Pillow>=7.1.2
99
# https://github.com/roboflow/roboflow-python/issues/390
10-
pillow-heif<2
10+
pi-heif<2
1111
pillow-avif-plugin<2
1212
python-dateutil
1313
python-dotenv

roboflow/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from roboflow.models import CLIPModel, GazeModel # noqa: F401
1616
from roboflow.util.general import write_line
1717

18-
__version__ = "1.2.1"
18+
__version__ = "1.2.3"
1919

2020

2121
def check_key(api_key, model, notebook, num_retries=0):

roboflow/util/image_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
import urllib
66

77
# Third-party imports
8+
import pi_heif # type: ignore[import-untyped]
89
import pillow_avif # type: ignore[import-untyped]
9-
import pillow_heif # type: ignore[import-untyped]
1010
import requests
1111
import yaml
1212
from PIL import Image
1313

14-
pillow_heif.register_heif_opener(thumbnails=False) # Register for HEIF/HEIC
14+
pi_heif.register_heif_opener(thumbnails=False) # Register for HEIF/HEIC
1515
pillow_avif = pillow_avif # Reference pillow_avif to not remove import by accident
1616

1717

0 commit comments

Comments
 (0)