From a67b191218c75640933762ecf85271f65be82f47 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sat, 5 Jul 2025 15:01:17 -0400 Subject: [PATCH] Fix imghdr stub for Python 3.13 --- src/utils/imghdr_stub.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/imghdr_stub.py b/src/utils/imghdr_stub.py index 326824f..50a6b69 100644 --- a/src/utils/imghdr_stub.py +++ b/src/utils/imghdr_stub.py @@ -11,7 +11,11 @@ import warnings __all__ = ["what"] -warnings._deprecated(__name__, remove=(3, 13)) +warnings.warn( + "'imghdr' is deprecated and will be removed in Python 3.13", + DeprecationWarning, + stacklevel=2, +) # ------------------------- # Recognize image headers