Skip to content

Commit de9e184

Browse files
committed
Extend invalid hatch pattern deprecation again
The comment says it should be 1 release after custom hatches are implemented, and they aren't implemented in 3.11, so this needs to go up.
1 parent c23808d commit de9e184

2 files changed

Lines changed: 5 additions & 13 deletions

File tree

lib/matplotlib/hatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def _validate_hatch_pattern(hatch):
206206
invalids = ''.join(sorted(invalids))
207207
_api.warn_deprecated(
208208
'3.4',
209-
removal='3.11', # one release after custom hatches (#20690)
209+
removal='3.13', # one release after custom hatches (#20690)
210210
message=f'hatch must consist of a string of "{valid}" or '
211211
'None, but found the following invalid values '
212212
f'"{invalids}". Passing invalid values is deprecated '

lib/matplotlib/tests/test_axes.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10047,21 +10047,13 @@ def assert_not_in_reference_cycle(start):
1004710047

1004810048

1004910049
def test_boxplot_tick_labels():
10050-
# Test the renamed `tick_labels` parameter.
10051-
# Test for deprecation of old name `labels`.
10050+
# Test the `tick_labels` parameter.
1005210051
np.random.seed(19680801)
1005310052
data = np.random.random((10, 3))
1005410053

10055-
fig, axs = plt.subplots(nrows=1, ncols=2, sharey=True)
10056-
# Should get deprecation warning for `labels`
10057-
with pytest.warns(mpl.MatplotlibDeprecationWarning,
10058-
match='has been renamed \'tick_labels\''):
10059-
axs[0].boxplot(data, labels=['A', 'B', 'C'])
10060-
assert [l.get_text() for l in axs[0].get_xticklabels()] == ['A', 'B', 'C']
10061-
10062-
# Test the new tick_labels parameter
10063-
axs[1].boxplot(data, tick_labels=['A', 'B', 'C'])
10064-
assert [l.get_text() for l in axs[1].get_xticklabels()] == ['A', 'B', 'C']
10054+
fig, ax = plt.subplots()
10055+
ax.boxplot(data, tick_labels=['A', 'B', 'C'])
10056+
assert [l.get_text() for l in ax.get_xticklabels()] == ['A', 'B', 'C']
1006510057

1006610058

1006710059
@needs_usetex

0 commit comments

Comments
 (0)