mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
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:
@@ -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)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user