Skip to content

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

Fix some more missing references. #16335

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 1 commit into from
Jan 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions 5 doc/api/cbook_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@
:members:
:undoc-members:
:show-inheritance:

.. automodule:: matplotlib.cbook.deprecation
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions 1 doc/api/colors_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ Functions
to_rgba
to_rgba_array
is_color_like
same_color
makeMappingArray
get_named_colors_mapping
2 changes: 1 addition & 1 deletion 2 doc/api/prev_api_changes/api_changes_3.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ The following classes, methods, functions, and attributes are deprecated:
in future versions. It is just an alias for
:class:`matplotlib.cbook.deprecation.MatplotlibDeprecationWarning`.
Please use the
:class:`~matplotlib.cbook.MatplotlibDeprecationWarning` directly if
``matplotlib.cbook.MatplotlibDeprecationWarning`` directly if
neccessary.
- The ``matplotlib.cbook.Bunch`` class has been deprecated. Instead, use
`types.SimpleNamespace` from the standard library which provides the same
Expand Down
2 changes: 1 addition & 1 deletion 2 doc/devel/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ prevent unexpected breaking of code that uses Matplotlib.
possible, the deprecation must never make a given piece of code do something
different than it was before; at least an exception should be raised.
- If possible, usage of an deprecated API should emit a
`MatplotlibDeprecationWarning`. There are a number of helper tools for this:
`.MatplotlibDeprecationWarning`. There are a number of helper tools for this:

- Use `.cbook.warn_deprecated()` for general deprecation warnings.
- Use the decorator ``@cbook.deprecated`` to deprecate classes, functions,
Expand Down
113 changes: 44 additions & 69 deletions 113 doc/missing-references.json
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,6 @@
"matplotlib.backends.backend_webagg_core.NavigationToolbar2WebAgg": [
"lib/matplotlib/backends/backend_nbagg.py:docstring of matplotlib.backends.backend_nbagg.NavigationIPy:1"
],
"matplotlib.cbook.MatplotlibDeprecationWarning": [
"doc/api/prev_api_changes/api_changes_3.0.0.rst:406"
],
"matplotlib.cbook.deprecation.MatplotlibDeprecationWarning": [
"doc/api/prev_api_changes/api_changes_3.0.0.rst:406"
],
"matplotlib.cm.Wistia": [
"doc/users/prev_whats_new/whats_new_1.4.rst:21"
],
Expand Down Expand Up @@ -626,7 +620,7 @@
"doc/api/prev_api_changes/api_changes_0.91.0.rst:34"
],
"matplotlib.pylab": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:624",
"doc/api/prev_api_changes/api_changes_3.1.0.rst:616",
"doc/users/history.rst:63"
],
"matplotlib.tests.test_basic": [
Expand Down Expand Up @@ -666,12 +660,12 @@
"lib/matplotlib/axes/_base.py:docstring of matplotlib.axes.Axes.update_datalim_bounds:2"
],
"Axes.fmt_xdata": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:405",
"doc/api/prev_api_changes/api_changes_3.1.0.rst:408"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:397",
"doc/api/prev_api_changes/api_changes_3.1.0.rst:400"
],
"Axes.fmt_ydata": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:405",
"doc/api/prev_api_changes/api_changes_3.1.0.rst:408"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:397",
"doc/api/prev_api_changes/api_changes_3.1.0.rst:400"
],
"Axes.transData": [
"doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst:89",
Expand All @@ -684,14 +678,14 @@
"lib/matplotlib/axes/_base.py:docstring of matplotlib.axes.Axes.add_child_axes:2"
],
"Axis._update_ticks": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1074"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1066"
],
"Axis.get_inverted": [
"doc/users/prev_whats_new/whats_new_3.1.0.rst:241",
"doc/users/prev_whats_new/whats_new_3.1.0.rst:243"
],
"Axis.remove_overlaping_locs": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:79"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:71"
],
"Axis.set_inverted": [
"doc/users/prev_whats_new/whats_new_3.1.0.rst:241",
Expand Down Expand Up @@ -732,8 +726,8 @@
"doc/devel/MEP/MEP23.rst:87"
],
"Formatter.__call__": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1123",
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1129"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1115",
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1121"
],
"GaussianKDE": [
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes.Axes.violinplot:46",
Expand All @@ -752,17 +746,7 @@
"lib/matplotlib/testing/decorators.py:docstring of matplotlib.testing.decorators.image_comparison:2"
],
"ImageComparisonTest": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:710"
],
"Legend": [
"doc/api/axes_api.rst:316:<autosummary>:1",
"lib/matplotlib/axes/_base.py:docstring of matplotlib.axes.Axes.get_legend:2"
],
"LinearSegmentedColormaps": [
"lib/matplotlib/colors.py:docstring of matplotlib.colors.makeMappingArray:64"
],
"MatplotlibDeprecationWarning": [
"doc/devel/contributing.rst:306"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:702"
],
"MicrosecondLocator.__call__": [
"doc/api/prev_api_changes/api_changes_1.5.0.rst:119"
Expand All @@ -789,7 +773,7 @@
"doc/devel/MEP/MEP23.rst:93"
],
"NavigationToolbar2QT.adj_window": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:969"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:961"
],
"PolyCollection.get_offset": [
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes.Axes.hexbin:71",
Expand Down Expand Up @@ -899,19 +883,19 @@
"doc/users/prev_whats_new/whats_new_3.0.rst:111"
],
"axes3d.Axes3D.xaxis": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:941"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:933"
],
"axes3d.Axes3D.yaxis": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:941"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:933"
],
"axes3d.Axes3D.zaxis": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:941"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:933"
],
"axes_grid1": [
"doc/index.rst:184"
],
"axis.Axis.get_ticks_position": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:829"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:821"
],
"axisartist": [
"doc/index.rst:184"
Expand All @@ -920,44 +904,44 @@
"lib/matplotlib/backends/backend_template.py:docstring of matplotlib.backends.backend_template.RendererTemplate:4"
],
"backend_bases.Timer.add_callback": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:267"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:259"
],
"backend_bases.Timer.remove_callback": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:247"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:239"
],
"backend_bases.ToolContainerBase": [
"lib/matplotlib/backend_tools.py:docstring of matplotlib.backend_tools.add_tools_to_container:8"
],
"backend_gtk3.FileChooserDialog": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:966"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:958"
],
"backend_gtk3.NavigationToolbar2GTK3.get_filechooser": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:967"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:959"
],
"backend_gtk3.SaveFigureGTK3.get_filechooser": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:968"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:960"
],
"backend_wx.IDLE_DELAY": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:970"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:962"
],
"barstacked": [
"doc/users/prev_whats_new/whats_new_1.2.rst:177"
],
"bezier.check_if_parallel": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:801"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:793"
],
"bezier.find_bezier_t_intersecting_with_closedpath": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:801"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:793"
],
"bezier.find_r_to_boundary_of_closedpath": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1026",
"doc/api/prev_api_changes/api_changes_3.1.0.rst:801"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1018",
"doc/api/prev_api_changes/api_changes_3.1.0.rst:793"
],
"bezier.split_bezier_intersecting_with_closedpath": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:801"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:793"
],
"bezier.split_path_inout": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:801"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:793"
],
"blocking_input.BlockingInput.__call__": [
"doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst:293"
Expand All @@ -979,17 +963,17 @@
"doc/devel/contributing.rst:521"
],
"cbook.deprecated": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1081",
"doc/api/prev_api_changes/api_changes_3.1.0.rst:774"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1073",
"doc/api/prev_api_changes/api_changes_3.1.0.rst:766"
],
"cbook.warn_deprecated": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:774"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:766"
],
"cbook.warn_deprecated()": [
"doc/devel/contributing.rst:309"
],
"collections.LineCollection.get_segements()": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:288"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:280"
],
"colorbar.ColorbarBase.outline": [
"doc/api/prev_api_changes/api_changes_1.4.x.rst:83"
Expand All @@ -998,13 +982,10 @@
"lib/matplotlib/testing/compare.py:docstring of matplotlib.testing.compare.compare_images:4"
],
"dates.bytespdate2num": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:927"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:919"
],
"dates.strpdate2num": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:926"
],
"extend": [
"lib/matplotlib/colors.py:docstring of matplotlib.colors.from_levels_and_colors:13"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:918"
],
"fc-list": [
"lib/matplotlib/font_manager.py:docstring of matplotlib.font_manager.get_fontconfig_fonts:2"
Expand Down Expand Up @@ -1101,7 +1082,7 @@
"doc/users/prev_whats_new/whats_new_2.0.0.rst:123"
],
"legend.Legend.set_draggable()": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:507"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:499"
],
"levels": [
"doc/api/prev_api_changes/api_changes_3.0.0.rst:197"
Expand Down Expand Up @@ -1446,16 +1427,13 @@
"doc/api/prev_api_changes/api_changes_1.5.0.rst:8"
],
"matplotlib.colorbar.ColorbarBase.set_clim": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:298"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:290"
],
"matplotlib.colorbar.ColorbarBase.set_cmap": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:298"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:290"
],
"matplotlib.colorbar.ColorbarBase.set_norm": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:298"
],
"matplotlib.colors.same_color": [
"doc/users/prev_whats_new/whats_new_2.2.rst:218"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:290"
],
"matplotlib.contour.TriContourSet": [
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.tricontour:57",
Expand All @@ -1473,10 +1451,10 @@
"doc/devel/documenting_mpl.rst:671"
],
"matplotlib.pylab": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:626"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:618"
],
"matplotlib.pyplot.get_scale_docs()": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:861"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:853"
],
"matplotlib.sphinxext.mathmpl": [
"doc/users/prev_whats_new/whats_new_3.0.rst:225"
Expand All @@ -1492,10 +1470,10 @@
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.rcdefaults:4"
],
"matplotlib.testing.compare.calculate_rms": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:779"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:771"
],
"matplotlib.testing.conftest.mpl_test_settings": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:949"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:941"
],
"move_canvas": [
"doc/devel/MEP/MEP23.rst:65"
Expand Down Expand Up @@ -1577,8 +1555,8 @@
"lib/matplotlib/dates.py:docstring of matplotlib.dates:105"
],
"scipy.stats.norm.pdf": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:573",
"doc/api/prev_api_changes/api_changes_3.1.0.rst:659"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:565",
"doc/api/prev_api_changes/api_changes_3.1.0.rst:651"
],
"self.codes": [
"lib/matplotlib/path.py:docstring of matplotlib.path.Path.codes:2"
Expand Down Expand Up @@ -1631,10 +1609,7 @@
"doc/devel/MEP/MEP10.rst:170"
],
"streamplot.Grid": [
"doc/api/prev_api_changes/api_changes_3.1.0.rst:487"
],
"strftime": [
"lib/matplotlib/dates.py:docstring of matplotlib.dates.ConciseDateFormatter:18"
"doc/api/prev_api_changes/api_changes_3.1.0.rst:479"
],
"style.available": [
"lib/matplotlib/style/__init__.py:docstring of matplotlib.style.context:12",
Expand Down
2 changes: 1 addition & 1 deletion 2 lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1756,7 +1756,7 @@ def axis(self, *args, emit=True, **kwargs):
return (*self.get_xlim(), *self.get_ylim())

def get_legend(self):
"""Return the `Legend` instance, or None if no legend is defined."""
"""Return the `.Legend` instance, or None if no legend is defined."""
return self.legend_

def get_images(self):
Expand Down
23 changes: 10 additions & 13 deletions 23 lib/matplotlib/cbook/deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class MatplotlibDeprecationWarning(UserWarning):
"""


# mplDeprecation is deprecated. Use MatplotlibDeprecationWarning instead.
mplDeprecation = MatplotlibDeprecationWarning
"""mplDeprecation is deprecated. Use MatplotlibDeprecationWarning instead."""


def _generate_deprecation_warning(
Expand Down Expand Up @@ -57,20 +57,18 @@ def warn_deprecated(
since, *, message='', name='', alternative='', pending=False,
obj_type='', addendum='', removal=''):
"""
Used to display deprecation in a standard way.
Display a standardized deprecation.

Parameters
----------
since : str
The release at which this API became deprecated.

message : str, optional
Override the default deprecation message. The format
specifier `%(name)s` may be used for the name of the function,
and `%(alternative)s` may be used in the deprecation message
to insert the name of an alternative to the deprecated
function. `%(obj_type)s` may be used to insert a friendly name
for the type of object being deprecated.
Override the default deprecation message. The ``%(since)s``,
``%(name)s``, ``%(alternative)s``, ``%(obj_type)s``, ``%(addendum)s``,
and ``%(removal)s`` format specifiers will be replaced by the values
of the respective arguments passed to this function.

name : str, optional
The name of the deprecated object.
Expand Down Expand Up @@ -127,11 +125,10 @@ def deprecated(since, *, message='', name='', alternative='', pending=False,
The release at which this API became deprecated.

message : str, optional
Override the default deprecation message. The format
specifier `%(name)s` may be used for the name of the object,
and `%(alternative)s` may be used in the deprecation message
to insert the name of an alternative to the deprecated
object.
Override the default deprecation message. The ``%(since)s``,
``%(name)s``, ``%(alternative)s``, ``%(obj_type)s``, ``%(addendum)s``,
and ``%(removal)s`` format specifiers will be replaced by the values
of the respective arguments passed to this function.

name : str, optional
The name used in the deprecation message; if not provided, the name
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.