-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Expire deprecations from 3.6 #24984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Expire deprecations from 3.6 #24984
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
8e59326
Unify pickradius arguments and checking
oscargus c6491af
Remove date_ticker_factory
oscargus 79e7e8b
Remove checkdep_usetex
oscargus 9aa564c
Expire deprecations
oscargus e5a456b
Remove stride_windows
oscargus ead1c17
Make most arguments to Line2D keyword only
oscargus 49d5ef9
Remove get_font_config
oscargus c2f97a7
Make most arguments to Text keyword only
oscargus fe925f6
Remove get_rotation
oscargus f146c00
Make all arguments to Collection and most to subclasses keyword only
oscargus 20e0f80
Remove additional arguments to get_window_extent
oscargus 9b9684d
Remove delay and output_args properties from ImageMagickBase
oscargus 350735e
Make most arguments to Figure/figure keyword only
oscargus 1a907a6
Expire parameter renamings
oscargus 9044761
Make most arguments to Image classes keyword only
oscargus a8fd351
Make most arguments to Legend keyword only
oscargus 61fa4f2
Make most arguments to OffsetBox classes keyword only
oscargus f7576ff
Make most arguments to Cell keyword only
oscargus f86cfb2
Remove get_texmanager
oscargus 6cdd1bb
Remove identify
oscargus c9942be
Remove move_from_center. tick_update_position, set_pane_pos, and w_*axis
oscargus ba959ad
Remove AddList, Padded, SizeFromFunc, and GetExtentHelper
oscargus 54a11c0
Remove delta* and new_gridlines
oscargus 5596329
Remove dist and make most argument to set_zlim keyword only
oscargus 98866a2
Make most argument to set_*lim keyword only
oscargus 1b2c011
Remove label
oscargus 74cb288
Remove execute_constrained_layout
oscargus 7c7a34a
Remove CleanupTestCase, cleanup, and check_freetype_version
oscargus a5d18ab
Remove use_line_collection argument to stem
oscargus 759f3f7
Remove get_renderer_cache
oscargus d090165
Remove privatized or unused helper functions
oscargus 1fedc53
Make most arguments to Patch classes keyword only
oscargus 832924b
Fix documentation
oscargus 55b83c6
Add api change note
oscargus c2b3f1f
Take review comments into account
oscargus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
Parameters to ``plt.figure()`` and the ``Figure`` constructor | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
All parameters to `.pyplot.figure` and the `.Figure` constructor, other than | ||
*num*, *figsize*, and *dpi*, are now keyword-only. | ||
|
||
``stem(..., use_line_collection=False)`` | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
... is no longer supported. This was a compatibility fallback to a | ||
former more inefficient representation of the stem lines. | ||
|
||
Positional / keyword arguments | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Passing all but the very few first arguments positionally in the constructors | ||
of Artists is no longer possible. Most arguments are now keyword-only. | ||
|
||
The *emit* and *auto* parameters of ``set_xlim``, ``set_ylim``, | ||
``set_zlim``, ``set_rlim`` are now keyword-only. | ||
|
||
The *transOffset* parameter of `.Collection.set_offset_transform` and the | ||
various ``create_collection`` methods of legend handlers has been renamed to | ||
*offset_transform* (consistently with the property name). | ||
|
||
``Axes.get_window_extent`` / ``Figure.get_window_extent`` accept only | ||
*renderer*. This aligns the API with the general `.Artist.get_window_extent` | ||
API. All other parameters were ignored anyway. | ||
|
||
Methods to set parameters in ``LogLocator`` and ``LogFormatter*`` | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
In `~.LogFormatter` and derived subclasses, the methods ``base`` and | ||
``label_minor`` for setting the respective parameter are removed and | ||
replaced by ``set_base`` and ``set_label_minor``, respectively. | ||
|
||
In `~.LogLocator`, the methods ``base`` and ``subs`` for setting the respective | ||
parameter are removed. Instead, use ``set_params(base=..., subs=...)``. | ||
|
||
``Axes.get_renderer_cache`` | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
The canvas now takes care of the renderer and whether to cache it or not, | ||
so the ``Axes.get_renderer_cache`` method is removed. The | ||
alternative is to call ``axes.figure.canvas.get_renderer()``. | ||
|
||
Unused methods in ``Axis``, ``Tick``, ``XAxis``, and ``YAxis`` | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
``Tick.label`` is now removed. Use ``Tick.label1`` instead. | ||
|
||
The following methods are no longer used and removed without a replacement: | ||
|
||
- ``Axis.get_ticklabel_extents`` | ||
- ``Tick.get_pad_pixels`` | ||
- ``XAxis.get_text_heights`` | ||
- ``YAxis.get_text_widths`` | ||
|
||
``mlab.stride_windows`` | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
... is removed. Use ``numpy.lib.stride_tricks.sliding_window_view`` instead. | ||
|
||
``Axes3D`` | ||
~~~~~~~~~~ | ||
|
||
The ``dist`` attribute has been privatized. Use the *zoom* keyword argument in | ||
`.Axes3D.set_box_aspect` instead. | ||
|
||
The ``w_xaxis``, ``w_yaxis``, and ``w_zaxis`` attributes are now removed. | ||
Instead use ``xaxis``, ``yaxis``, and ``zaxis``. | ||
|
||
3D Axis | ||
~~~~~~~ | ||
|
||
``mplot3d.axis3d.Axis.set_pane_pos`` is removed. This is an internal method | ||
where the provided values are overwritten during drawing. Hence, it does not | ||
serve any purpose to be directly accessible. | ||
|
||
The two helper functions ``mplot3d.axis3d.move_from_center`` and | ||
``mplot3d.axis3d.tick_update_position`` are considered internal and deprecated. | ||
If these are required, please vendor the code from the corresponding private | ||
methods ``_move_from_center`` and ``_tick_update_position``. | ||
|
||
``checkdep_usetex`` removed | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
This method was only intended to disable tests in case no latex install was | ||
found. As such, it is considered to be private and for internal use only. | ||
|
||
Please vendor the code from a previous version if you need this. | ||
|
||
``date_ticker_factory`` removed | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
The ``date_ticker_factory`` method in the `matplotlib.dates` module is | ||
removed. Instead use `~.AutoDateLocator` and `~.AutoDateFormatter` for a | ||
more flexible and scalable locator and formatter. | ||
|
||
If you need the exact ``date_ticker_factory`` behavior, please copy the code | ||
from a previous version. | ||
|
||
``transforms.Affine2D.identity()`` | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
... is removed in favor of directly calling the `.Affine2D` constructor with | ||
no arguments. | ||
|
||
Removals in ``testing.decorators`` | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
The unused class ``CleanupTestCase`` and decorator ``cleanup`` are removed. | ||
The function ``check_freetype_version`` is considered internal and removed. | ||
Vendor the code from a previous version. | ||
|
||
``text.get_rotation()`` | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
... is removed with no replacement. Copy the previous implementation if | ||
needed. | ||
|
||
Miscellaneous internals | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
- ``axes_grid1.axes_size.AddList``; use ``sum(sizes, start=Fixed(0))`` (for | ||
example) to sum multiple size objects. | ||
- ``axes_size.Padded``; use ``size + pad`` instead | ||
- ``axes_size.SizeFromFunc``, ``axes_size.GetExtentHelper`` | ||
- ``AxisArtistHelper.delta1`` and ``AxisArtistHelper.delta2`` | ||
- ``axislines.GridHelperBase.new_gridlines`` and | ||
``axislines.Axes.new_gridlines`` | ||
- ``_DummyAxis.dataLim`` and ``_DummyAxis.viewLim``; use | ||
``get_data_interval()``, ``set_data_interval()``, ``get_view_interval()``, | ||
and ``set_view_interval()`` instead. | ||
- ``ImageMagickBase.delay`` and ``ImageMagickBase.output_args`` | ||
- ``MathtextBackend``, ``MathtextBackendAgg``, ``MathtextBackendPath``, | ||
``MathTextWarning`` | ||
- ``TexManager.get_font_config``; it previously returned an internal hashed key | ||
for used for caching purposes. | ||
- ``TextToPath.get_texmanager``; directly construct a `.texmanager.TexManager` | ||
instead. | ||
- ``ticker.is_close_to_int``; use ``math.isclose(x, round(x))`` instead. | ||
- ``ticker.is_decade``; use ``y = numpy.log(x)/numpy.log(base); | ||
numpy.isclose(y, numpy.round(y))`` instead. | ||
|
||
|
||
Backend-specific removals | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
- ``backend_pdf.Name.hexify`` | ||
- ``backend_pdf.Operator`` and ``backend_pdf.Op.op`` are removed in favor of | ||
a single standard `enum.Enum` interface on `.backend_pdf.Op`. | ||
- ``backend_pdf.fill``; vendor the code of the similarly named private | ||
functions if you rely on these functions. | ||
- ``backend_pgf.LatexManager.texcommand`` and | ||
``backend_pgf.LatexManager.latex_header`` | ||
- ``backend_pgf.NO_ESCAPE`` | ||
- ``backend_pgf.common_texification`` | ||
- ``backend_pgf.get_fontspec`` | ||
- ``backend_pgf.get_preamble`` | ||
- ``backend_pgf.re_mathsep`` | ||
- ``backend_pgf.writeln`` | ||
- ``backend_ps.convert_psfrags`` | ||
- ``backend_ps.quote_ps_string``; vendor the code of the similarly named | ||
private functions if you rely on it. | ||
- ``backend_svg.escape_attrib``; vendor the code of the similarly named private | ||
functions if you rely on it. | ||
- ``backend_svg.escape_cdata``; vendor the code of the similarly named private | ||
functions if you rely on it. | ||
- ``backend_svg.escape_comment``; vendor the code of the similarly named | ||
private functions if you rely on it. | ||
- ``backend_svg.short_float_fmt``; vendor the code of the similarly named | ||
private functions if you rely on it. | ||
- ``backend_svg.generate_transform`` and ``backend_svg.generate_css`` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -270,9 +270,6 @@ Aliases and deprecated methods | |
tunit_cube | ||
tunit_edges | ||
unit_cube | ||
w_xaxis | ||
w_yaxis | ||
w_zaxis | ||
|
||
|
||
Other | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One would have expected this to warn earlier?
Edit: it did warn, but it seems like the doc-build didn't pick it up.