Merge pull request #6905 from hugovk/deprecate-pillow-11

Handling for deprecations to be removed in Pillow 11
This commit is contained in:
Andrew Murray 2023-01-21 07:06:59 +11:00 committed by GitHub
commit 535d886bf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -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\. "

View File

@ -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)