Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Remove mplDeprecation#11247

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall 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
7 changes: 7 additions & 0 deletionsdoc/api/next_api_changes/2018-05-16-TH.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
``matplotlib.cbook.deprecation.mplDeprecation`` is deprecated
-------------------------------------------------------------

:class:`matplotlib.cbook.deprecation.mplDeprecation` will be removed in
future versions. It is just an alias for
:class:`matplotlib.cbook.deprecation.MatplotlibDeprecationWarning`.
Please use the :class:`~.MatplotlibDeprecationWarning` directly if neccessary.
7 changes: 4 additions & 3 deletionslib/matplotlib/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -140,7 +140,8 @@
# definitions, so it is safe to import from it here.
from . import cbook
from matplotlib.cbook import (
mplDeprecation, dedent, get_label, sanitize_sequence)
MatplotlibDeprecationWarning, dedent, get_label, sanitize_sequence)
from matplotlib.cbook import mplDeprecation # deprecated
from matplotlib.rcsetup import defaultParams, validate_backend, cycler

import numpy
Expand DownExpand Up@@ -1092,7 +1093,7 @@ def rc_params_from_file(fname, fail_on_error=False, use_default_template=True):

iter_params = defaultParams.items()
with warnings.catch_warnings():
warnings.simplefilter("ignore",mplDeprecation)
warnings.simplefilter("ignore",MatplotlibDeprecationWarning)
config = RcParams([(key, default) for key, (default, _) in iter_params
if key not in _all_deprecated])
config.update(config_from_file)
Expand DownExpand Up@@ -1133,7 +1134,7 @@ def rc_params_from_file(fname, fail_on_error=False, use_default_template=True):
rcParamsOrig = rcParams.copy()

with warnings.catch_warnings():
warnings.simplefilter("ignore",mplDeprecation)
warnings.simplefilter("ignore",MatplotlibDeprecationWarning)
rcParamsDefault = RcParams([(key, default) for key, (default, converter) in
defaultParams.items()
if key not in _all_deprecated])
Expand Down
2 changes: 1 addition & 1 deletionlib/matplotlib/axes/_axes.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,7 +34,7 @@
import matplotlib.transforms as mtransforms
import matplotlib.tri as mtri
from matplotlib.cbook import (
mplDeprecation, warn_deprecated, STEP_LOOKUP_MAP, iterable,
MatplotlibDeprecationWarning, warn_deprecated, STEP_LOOKUP_MAP, iterable,
safe_first_element)
from matplotlib.container import BarContainer, ErrorbarContainer, StemContainer
from matplotlib.axes._base import _AxesBase, _process_plot_format
Expand Down
4 changes: 2 additions & 2 deletionslib/matplotlib/cbook/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,8 +31,8 @@
import numpy as np

import matplotlib
from .deprecation importdeprecated, warn_deprecated
from .deprecation importmplDeprecation, MatplotlibDeprecationWarning
from .deprecation import(
mplDeprecation,deprecated, warn_deprecated,MatplotlibDeprecationWarning)


@deprecated("3.0")
Expand Down
1 change: 1 addition & 0 deletionslib/matplotlib/cbook/deprecation.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,6 +17,7 @@ class MatplotlibDeprecationWarning(UserWarning):


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


def _generate_deprecation_message(
Expand Down
2 changes: 1 addition & 1 deletionlib/matplotlib/gridspec.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@
import numpy as np

import matplotlib as mpl
from matplotlib import _pylab_helpers, tight_layout, rcParams
from matplotlib import _pylab_helpers,cbook,tight_layout, rcParams
from matplotlib.transforms import Bbox
import matplotlib._layoutbox as layoutbox

Expand Down
4 changes: 2 additions & 2 deletionslib/matplotlib/pyplot.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2276,9 +2276,9 @@ def plotfile(fname, cols=(0,), plotfuncs=None,

if plotfuncs is None:
plotfuncs = dict()
from matplotlib.cbook importmplDeprecation
from matplotlib.cbook importMatplotlibDeprecationWarning
with warnings.catch_warnings():
warnings.simplefilter('ignore',mplDeprecation)
warnings.simplefilter('ignore',MatplotlibDeprecationWarning)
r = mlab.csv2rec(fname, comments=comments, skiprows=skiprows,
checkrows=checkrows, delimiter=delimiter, names=names)

Expand Down
1 change: 0 additions & 1 deletionlib/matplotlib/tests/test_cycles.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
import warnings

from matplotlib.testing.decorators import image_comparison
from matplotlib.cbook import MatplotlibDeprecationWarning
import matplotlib.pyplot as plt
import numpy as np
import pytest
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp