9
9
"version, expected" ,
10
10
[
11
11
(
12
- 12 ,
13
- "Old thing is deprecated and will be removed in Pillow 12 "
14
- r"\(2025 -10-15\)\. Use new thing instead\." ,
12
+ 13 ,
13
+ "Old thing is deprecated and will be removed in Pillow 13 "
14
+ r"\(2026 -10-15\)\. Use new thing instead\." ,
15
15
),
16
16
(
17
17
None ,
@@ -53,18 +53,18 @@ def test_old_version(deprecated: str, plural: bool, expected: str) -> None:
53
53
54
54
def test_plural () -> None :
55
55
expected = (
56
- r"Old things are deprecated and will be removed in Pillow 12 \(2025 -10-15\)\. "
56
+ r"Old things are deprecated and will be removed in Pillow 13 \(2026 -10-15\)\. "
57
57
r"Use new thing instead\."
58
58
)
59
59
with pytest .warns (DeprecationWarning , match = expected ):
60
- _deprecate .deprecate ("Old things" , 12 , "new thing" , plural = True )
60
+ _deprecate .deprecate ("Old things" , 13 , "new thing" , plural = True )
61
61
62
62
63
63
def test_replacement_and_action () -> None :
64
64
expected = "Use only one of 'replacement' and 'action'"
65
65
with pytest .raises (ValueError , match = expected ):
66
66
_deprecate .deprecate (
67
- "Old thing" , 12 , replacement = "new thing" , action = "Upgrade to new thing"
67
+ "Old thing" , 13 , replacement = "new thing" , action = "Upgrade to new thing"
68
68
)
69
69
70
70
@@ -77,16 +77,16 @@ def test_replacement_and_action() -> None:
77
77
)
78
78
def test_action (action : str ) -> None :
79
79
expected = (
80
- r"Old thing is deprecated and will be removed in Pillow 12 \(2025 -10-15\)\. "
80
+ r"Old thing is deprecated and will be removed in Pillow 13 \(2026 -10-15\)\. "
81
81
r"Upgrade to new thing\."
82
82
)
83
83
with pytest .warns (DeprecationWarning , match = expected ):
84
- _deprecate .deprecate ("Old thing" , 12 , action = action )
84
+ _deprecate .deprecate ("Old thing" , 13 , action = action )
85
85
86
86
87
87
def test_no_replacement_or_action () -> None :
88
88
expected = (
89
- r"Old thing is deprecated and will be removed in Pillow 12 \(2025 -10-15\)"
89
+ r"Old thing is deprecated and will be removed in Pillow 13 \(2026 -10-15\)"
90
90
)
91
91
with pytest .warns (DeprecationWarning , match = expected ):
92
- _deprecate .deprecate ("Old thing" , 12 )
92
+ _deprecate .deprecate ("Old thing" , 13 )
0 commit comments