mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
Handling for deprecations to be removed in Pillow 11
This commit is contained in:
parent
50f5eade47
commit
9b660db62d
|
@ -11,6 +11,11 @@ from PIL import _deprecate
|
|||
"Old thing is deprecated and will be removed in Pillow 10 "
|
||||
r"\(2023-07-01\)\. Use new thing instead\.",
|
||||
),
|
||||
(
|
||||
11,
|
||||
"Old thing is deprecated and will be removed in Pillow 11 "
|
||||
r"\(2024-10-15\)\. Use new thing instead\.",
|
||||
),
|
||||
(
|
||||
None,
|
||||
r"Old thing is deprecated and will be removed in a future version\. "
|
||||
|
|
|
@ -47,6 +47,8 @@ def deprecate(
|
|||
raise RuntimeError(msg)
|
||||
elif when == 10:
|
||||
removed = "Pillow 10 (2023-07-01)"
|
||||
elif when == 11:
|
||||
removed = "Pillow 11 (2024-10-15)"
|
||||
else:
|
||||
msg = f"Unknown removal version, update {__name__}?"
|
||||
raise ValueError(msg)
|
||||
|
|
Loading…
Reference in New Issue
Block a user