Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling for deprecations to be removed in Pillow 11 #6905

Merged
merged 1 commit into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions Tests/test_deprecate.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
"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\. "
Expand Down
2 changes: 2 additions & 0 deletions src/PIL/_deprecate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down