diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a9481351..6173fc4b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: os: ["ubuntu-latest", "windows-latest"] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] runs-on: ${{ matrix.os }} env: PYTHONUTF8: 1 diff --git a/requirements.txt b/requirements.txt index d0736cd6..0ca7bcb5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,8 @@ numpy>=1.18.5 opencv-python-headless==4.10.0.84 Pillow>=7.1.2 # https://github.com/roboflow/roboflow-python/issues/390 -pillow-heif<1 +pillow-heif<2 +pillow-avif-plugin<2 python-dateutil python-dotenv requests diff --git a/roboflow/__init__.py b/roboflow/__init__.py index 00fae2b2..c2d52491 100644 --- a/roboflow/__init__.py +++ b/roboflow/__init__.py @@ -15,7 +15,7 @@ from roboflow.models import CLIPModel, GazeModel # noqa: F401 from roboflow.util.general import write_line -__version__ = "1.1.67" +__version__ = "1.2.0" def check_key(api_key, model, notebook, num_retries=0): diff --git a/roboflow/util/image_utils.py b/roboflow/util/image_utils.py index c9ca6b2a..71a32824 100644 --- a/roboflow/util/image_utils.py +++ b/roboflow/util/image_utils.py @@ -5,13 +5,14 @@ import urllib # Third-party imports +import pillow_avif # type: ignore[import-untyped] import pillow_heif # type: ignore[import-untyped] import requests import yaml from PIL import Image pillow_heif.register_heif_opener(thumbnails=False) # Register for HEIF/HEIC -pillow_heif.register_avif_opener(thumbnails=False) # Register for AVIF +pillow_avif = pillow_avif # Reference pillow_avif to not remove import by accident def check_image_path(image_path): diff --git a/tests/test_project.py b/tests/test_project.py index 384e1d3a..96ff4ab9 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -85,6 +85,7 @@ def test_check_valid_image_with_accepted_formats(self): "woodland-rabbit.png", "file_example_TIFF_1MB.tiff", "sky-rabbit.heic", + "whatsnew.avif", ] for image in images_to_test: