From c7e6289b36d4eb1823b6bfcace27674826a58e43 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Tue, 13 Aug 2024 19:07:01 +1000 Subject: [PATCH] Use relative import --- src/PIL/features.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PIL/features.py b/src/PIL/features.py index 9421dbd3c..e505adae0 100644 --- a/src/PIL/features.py +++ b/src/PIL/features.py @@ -7,9 +7,9 @@ import warnings from typing import IO import PIL -from PIL import _deprecate from . import Image +from ._deprecate import deprecate modules = { "pil": ("PIL._imaging", "PILLOW_VERSION"), @@ -149,7 +149,7 @@ def check_feature(feature: str) -> bool | None: try: imported_module = __import__(module, fromlist=["PIL"]) if isinstance(flag, bool): - _deprecate.deprecate(f'check_feature("{feature}")', 12) + deprecate(f'check_feature("{feature}")', 12) return flag return getattr(imported_module, flag) except ModuleNotFoundError: