8000 Merge pull request #20465 from QuLogic/remove-33-deprecations · matplotlib/matplotlib@9351d73 · GitHub
[go: up one dir, main page]

Skip to content
< 8000 header class="HeaderMktg header-logged-out js-details-container js-header Details f4 py-3" role="banner" data-is-top="true" data-color-mode=light data-light-theme=light data-dark-theme=dark>

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9351d73

Browse files
authored
Merge pull request #20465 from QuLogic/remove-33-deprecations
Remove remaining 3.3 deprecations
2 parents 11a628f + b04f1a3 commit 9351d73

File tree

20 files changed

+131
-385
lines changed

20 files changed

+131
-385
lines changed

doc/api/animation_api.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ on all systems.
186186

187187
FFMpegWriter
188188
ImageMagickWriter
189-
AVConvWriter
190189

191190
The file-based writers save temporary files for each frame which are stitched
192191
into a single file at the end. Although slower, these writers can be easier to
@@ -198,7 +197,6 @@ debug.
198197

199198
FFMpegFileWriter
200199
ImageMagickFileWriter
201-
AVConvFileWriter
202200

203201
Fundamentally, a `MovieWriter` provides a way to grab sequential frames
204202
from the same underlying `~matplotlib.figure.Figure` object. The base
@@ -283,7 +281,6 @@ and mixins
283281
:toctree: _as_gen
284282
:nosignatures:
285283

286-
AVConvBase
287284
FFMpegBase
288285
ImageMagickBase
289286

@@ -298,6 +295,6 @@ Inheritance Diagrams
298295
:private-bases:
299296
:parts: 1
300297

301-
.. inheritance-diagram:: matplotlib.animation.AVConvFileWriter matplotlib.animation.AVConvWriter matplotlib.animation.FFMpegFileWriter matplotlib.animation.FFMpegWriter matplotlib.animation.ImageMagickFileWriter matplotlib.animation.ImageMagickWriter
298+
.. inheritance-diagram:: matplotlib.animation.FFMpegFileWriter matplotlib.animation.FFMpegWriter matplotlib.animation.ImageMagickFileWriter matplotlib.animation.ImageMagickWriter
302299
:private-bases:
303300
:parts: 1

doc/api/artist_api.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ Interactive
3636
Artist.format_cursor_data
3737
Artist.mouseover
3838
Artist.contains
39-
Artist.set_contains
40-
Artist.get_contains
4139
Artist.pick
4240
Artist.pickable
4341
Artist.set_picker
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
Case-insensitive properties
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
Upper or mixed-case property names are no longer normalized to lowercase in
4+
`.Artist.set` and `.Artist.update`. This allows one to pass names such as
5+
*patchA* or *UVC*.
6+
7+
Case-insensitive capstyles and joinstyles
8+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9+
Please pass capstyles ("miter", "round", "bevel") and joinstyles ("butt",
10+
"round", "projecting") as lowercase.
11+
12+
AVConv animation writers removed
13+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14+
The ``AVConvBase``, ``AVConvWriter`` and ``AVConvFileWriter`` classes, and the
15+
associated ``animation.avconv_path`` and ``animation.avconv_args`` rcParams
16+
have been removed.
17+
18+
Debian 8 (2015, EOL 06/2020) and Ubuntu 14.04 (EOL 04/2019) were the
19+
last versions of Debian and Ubuntu to ship avconv. It remains possible
20+
to force the use of avconv by using the FFmpeg-based writers with
21+
:rc:`animation.ffmpeg_path` set to "avconv".
22+
23+
``MovieWriter`` attributes
24+
~~~~~~~~~~~~~~~~~~~~~~~~~~
25+
* ``animation.html_args`` rcParam
26+
* ``HTMLWriter.args_key`` attribute
27+
* ``MovieWriter.args_key`` and ``MovieWriter.exec_key`` attributes
28+
* *clear_temp* parameter and attribute of `.FileMovieWriter`; files placed in a
29+
temporary directory (using ``frame_prefix=None``, the default) will be
30+
cleared; files placed elsewhere will not.
31+
32+
Artist-specific removals
33+
~~~~~~~~~~~~~~~~~~~~~~~~
34+
* Setting a custom method overriding `.Artist.contains` using
35+
``Artist.set_contains`` has been removed, as has ``Artist.get_contains``.
36+
There is no replacement, but you may still customize pick events using
37+
`.Artist.set_picker`.
38+
* Passing the dash offset as ``None`` is no longer accepted, as this was never
39+
universally implemented, e.g. for vector output. Set the offset to 0 instead.
40+
* The parameter *props* of `.Shadow` has been removed. Use keyword arguments
41+
instead.
42+
* Arbitrary keyword arguments to ``StreamplotSet`` have no effect and have been
43+
removed.
44+
* ``NonUniformImage.is_grayscale`` and ``PcolorImage.is_grayscale`` attributes
45+
have been removed, for consistency with ``AxesImage.is_grayscale``. (Note
46+
that previously, these attributes were only available *after rendering the
47+
image*).
48+
49+
Path helpers
50+
~~~~~~~~~~~~
51+
* ``bezier.make_path_regular``; use ``Path.cleaned()`` (or
52+
``Path.cleaned(curves=True)``, etc.) instead, but note that these methods add
53+
a ``STOP`` code at the end of the path.
54+
* ``bezier.concatenate_paths``; use ``Path.make_compound_path()`` instead.
55+
* *quantize* parameter of `.Path.cleaned()`
56+
57+
``BboxBase.inverse_transformed``
58+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59+
60+
``.BboxBase.inverse_transformed`` has been removed (call `.BboxBase.transformed`
61+
on the `~.Transform.inverted()` transform instead).
62+
63+
``matplotlib.test(recursionlimit=...)``
64+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65+
The *recursionlimit* parameter of `matplotlib.test` has been removed.
66+
67+
``testing.compare.make_external_conversion_command``
68+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69+
... has been removed.
70+
71+
``docstring.Substitution.from_params``
72+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73+
This method has been removed. If needed, directly assign to the ``params``
74+
attribute of the Substitution object.
75+
76+
``widgets.TextBox.params_to_disable``
77+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
78+
This attribute has been removed.
79+
80+
`.widgets.SubplotTool` callbacks and axes
81+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
82+
The ``funcleft``, ``funcright``, ``funcbottom``, ``functop``, ``funcwspace``,
83+
and ``funchspace`` methods of `.widgets.SubplotTool` have been removed.
84+
85+
The ``axleft``, ``axright``, ``axbottom``, ``axtop``, ``axwspace``, and
86+
``axhspace`` attributes of `.widgets.SubplotTool` have been removed. Access
87+
the ``ax`` attribute of the corresponding slider, if needed.
88+
89+
Variants on ``ToolManager.update_keymap`` calls
90+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
91+
Passing multiple keys as a single comma-separated string or multiple arguments
92+
to `.ToolManager.update_keymap` is no longer supported; pass keys as a list of
93+
strings instead.

doc/api/prev_api_changes/api_changes_0.98.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ with a verb in the present tense.
126126
| ``lbwh_to_bbox(l, b, w, h)`` | `Bbox.from_bounds(x0, y0, w, h) <.Bbox.from_bounds>` |
127127
| | [It is a staticmethod.] |
128128
+--------------------------------------------+------------------------------------------------------+
129-
| ``inverse_transform_bbox(trans, bbox)`` | `Bbox.inverse_transformed(trans) |
130-
| | <.BboxBase.inverse_transformed>` |
129+
| ``inverse_transform_bbox(trans, bbox)`` | ``bbox.inverse_transformed(trans)`` |
130+
| | |
131131
+--------------------------------------------+------------------------------------------------------+
132132
| ``Interval.contains_open(v)`` | `interval_contains_open(tuple, v) |
133133
| | <.interval_contains_open>` |

lib/matplotlib/__init__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,8 +1174,7 @@ def _init_tests():
11741174
"" if ft2font.__freetype_build_type__ == 'local' else "not "))
11751175

11761176

1177-
@_api.delete_parameter("3.3", "recursionlimit")
1178-
def test(verbosity=None, coverage=False, *, recursionlimit=0, **kwargs):
1177+
def test(verbosity=None, coverage=False, **kwargs):
11791178
"""Run the matplotlib test suite."""
11801179

11811180
try:
@@ -1192,8 +1191,6 @@ def test(verbosity=None, coverage=False, *, recursionlimit=0, **kwargs):
11921191
old_recursionlimit = sys.getrecursionlimit()
11931192
try:
11941193
use('agg')
1195-
if recursionlimit:
1196-
sys.setrecursionlimit(recursionlimit)
11971194

11981195
args = kwargs.pop('argv', [])
11991196
provide_default_modules = True
@@ -1222,8 +1219,6 @@ def test(verbosity=None, coverage=False, *, recursionlimit=0, **kwargs):
12221219
finally:
12231220
if old_backend.lower() != 'agg':
12241221
use(old_backend)
1225-
if recursionlimit:
1226-
sys.setrecursionlimit(old_recursionlimit)
12271222

12281223
return retcode
12291224

lib/matplotlib/_enums.py

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"""
1212

1313
from enum import Enum, auto
14-
from matplotlib import cbook, docstring
14+
from matplotlib import docstring
1515

1616

1717
class _AutoStringNameEnum(Enum):
@@ -24,23 +24,6 @@ def __hash__(self):
2424
return str(self).__hash__()
2525

2626

27-
def _deprecate_case_insensitive_join_cap(s):
28-
s_low = s.lower()
29-
if s != s_low:
30-
if s_low in ['miter', 'round', 'bevel']:
31-
cbook.warn_deprecated(
32-
"3.3", message="Case-insensitive capstyles are deprecated "
33-
"since %(since)s and support for them will be removed "
34-
"%(removal)s; please pass them in lowercase.")
35-
elif s_low in ['butt', 'round', 'projecting']:
36-
cbook.warn_deprecated(
37-
"3.3", message="Case-insensitive joinstyles are deprecated "
38-
"since %(since)s and support for them will be removed "
39-
"%(removal)s; please pass them in lowercase.")
40-
# Else, error out at the check_in_list stage.
41-
return s_low
42-
43-
4427
class JoinStyle(str, _AutoStringNameEnum):
4528
"""
4629
Define how the connection between two line segments is drawn.
@@ -100,10 +83,6 @@ class JoinStyle(str, _AutoStringNameEnum):
10083
round = auto()
10184
bevel = auto()
10285

103-
def __init__(self, s):
104-
s = _deprecate_case_insensitive_join_cap(s)
105-
Enum.__init__(self)
106-
10786
@staticmethod
10887
def demo():
10988
"""Demonstrate how each JoinStyle looks for various join angles."""
@@ -173,10 +152,6 @@ class CapStyle(str, _AutoStringNameEnum):
173152
projecting = 'projecting'
174153
round = 'round'
175154

176-
def __init__(self, s):
177-
s = _deprecate_case_insensitive_join_cap(s)
178-
Enum.__init__(self)
179-
180155
@staticmethod
181156
def demo():
182157
"""Demonstrate how each CapStyle looks for a thick line segment."""

0 commit comments

Comments
 (0)
0