Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1123d70

Browse files
committed
Remove hard-coded API removal version mapping.
Clearly we're not updating the removal version dict anymore, and always saying "removed two minor releases later" seems just fine anyways.
1 parent adb2a65 commit 1123d70

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

lib/matplotlib/_api/deprecation.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ def _generate_deprecation_warning(
4242
raise ValueError(
4343
"A pending deprecation cannot have a scheduled removal")
4444
else:
45-
if removal:
46-
removal = "in {}".format(removal)
47-
else:
48-
removal = {"2.2": "in 3.1", "3.0": "in 3.2", "3.1": "in 3.3"}.get(
49-
since, "two minor releases later")
45+
removal = f"in {removal}" if removal else "two minor releases later"
5046
if not message:
5147
message = (
5248
"\nThe %(name)s %(obj_type)s"

0 commit comments

Comments
 (0)