mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-03 21:24:31 +03:00
Merge pull request #6905 from hugovk/deprecate-pillow-11
Handling for deprecations to be removed in Pillow 11
This commit is contained in:
commit
535d886bf9
|
@ -11,6 +11,11 @@ from PIL import _deprecate
|
||||||
"Old thing is deprecated and will be removed in Pillow 10 "
|
"Old thing is deprecated and will be removed in Pillow 10 "
|
||||||
r"\(2023-07-01\)\. Use new thing instead\.",
|
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,
|
None,
|
||||||
r"Old thing is deprecated and will be removed in a future version\. "
|
r"Old thing is deprecated and will be removed in a future version\. "
|
||||||
|
|
|
@ -47,6 +47,8 @@ def deprecate(
|
||||||
raise RuntimeError(msg)
|
raise RuntimeError(msg)
|
||||||
elif when == 10:
|
elif when == 10:
|
||||||
removed = "Pillow 10 (2023-07-01)"
|
removed = "Pillow 10 (2023-07-01)"
|
||||||
|
elif when == 11:
|
||||||
|
removed = "Pillow 11 (2024-10-15)"
|
||||||
else:
|
else:
|
||||||
msg = f"Unknown removal version, update {__name__}?"
|
msg = f"Unknown removal version, update {__name__}?"
|
||||||
raise ValueError(msg)
|
raise ValueError(msg)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user