Merge pull request #911 from RobinD42/fix-issue902

Switch deprecation warnings in wx.lib.plot
(cherry picked from commit eac1404fcc)
This commit is contained in:
Robin Dunn
2018-07-04 00:47:30 -07:00
parent 03e6abf33e
commit 9723f49ec0
4 changed files with 9 additions and 5 deletions

View File

@@ -59,6 +59,10 @@ Changes in this release include the following:
* Add flag to hide page in wx.lib.agw.aui.notebook. (#895)
* Switch wx.lib.plot to issue deprecation warnings with PlotPendingDeprecation
so it doesn't have to enable all warnings to get them to be shown by default.
(#902)

View File

@@ -40,6 +40,7 @@ from .polyobjects import PlotPrintout
from .utils import TempStyle
from .utils import pendingDeprecation
from .utils import PlotPendingDeprecation
# For backwards compat.
BoxPlot = PolyBoxPlot

View File

@@ -36,10 +36,6 @@ from .utils import TempStyle
from .utils import pairwise
# XXX: Comment out this line to disable deprecation warnings
warnings.simplefilter('default')
class PolyPoints(object):
"""
Base Class for lines and markers.

View File

@@ -19,8 +19,11 @@ import itertools
from warnings import warn as _warn
# Third Party
import wx
import numpy as np
class PlotPendingDeprecation(wx.wxPyDeprecationWarning):
pass
class DisplaySide(object):
"""
@@ -252,7 +255,7 @@ def pendingDeprecation(new_func):
"""
warn_txt = "`{}` is pending deprecation. Please use `{}` instead."
_warn(warn_txt.format(inspect.stack()[1][3], new_func),
PendingDeprecationWarning)
PlotPendingDeprecation)
def scale_and_shift_point(x, y, scale=1, shift=0):