Skip to content

Commit

Permalink
Merge pull request #6905 from hugovk/deprecate-pillow-11
Browse files Browse the repository at this point in the history
Handling for deprecations to be removed in Pillow 11
  • Loading branch information
radarhere committed Jan 20, 2023
2 parents 0b53853 + 9b660db commit 535d886
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
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

0 comments on commit 535d886

Please sign in to comment.