##// END OF EJS Templates
Merge pull request #10039 from Carreau/deprecation-warnings...
Thomas Kluyver -
r22995:bac02d02 merge
parent child Browse files
Show More
@@ -63,7 +63,7 b' def BdbQuit_excepthook(et, ev, tb, excepthook=None):'
63 63 parameter.
64 64 """
65 65 warnings.warn("`BdbQuit_excepthook` is deprecated since version 5.1",
66 DeprecationWarning)
66 DeprecationWarning, stacklevel=2)
67 67 if et==bdb.BdbQuit:
68 68 print('Exiting Debugger.')
69 69 elif excepthook is not None:
@@ -76,7 +76,7 b' def BdbQuit_excepthook(et, ev, tb, excepthook=None):'
76 76 def BdbQuit_IPython_excepthook(self,et,ev,tb,tb_offset=None):
77 77 warnings.warn(
78 78 "`BdbQuit_IPython_excepthook` is deprecated since version 5.1",
79 DeprecationWarning)
79 DeprecationWarning, stacklevel=2)
80 80 print('Exiting Debugger.')
81 81
82 82
@@ -128,7 +128,7 b' class Tracer(object):'
128 128 """
129 129 warnings.warn("`Tracer` is deprecated since version 5.1, directly use "
130 130 "`IPython.core.debugger.Pdb.set_trace()`",
131 DeprecationWarning)
131 DeprecationWarning, stacklevel=2)
132 132
133 133 ip = get_ipython()
134 134 if ip is None:
@@ -165,7 +165,8 b' class Deprec(object):'
165 165
166 166 def __getattr__(self, name):
167 167 val = getattr(self.wrapped, name)
168 warnings.warn("Using ExceptionColors global is deprecated and will be removed in IPython 6.0", DeprecationWarning)
168 warnings.warn("Using ExceptionColors global is deprecated and will be removed in IPython 6.0",
169 DeprecationWarning, stacklevel=2)
169 170 # using getattr after warnings break ipydoctest in weird way for 3.5
170 171 return val
171 172
@@ -658,7 +658,9 b' guis = inputhook_manager.guihooks'
658 658
659 659
660 660 def _deprecated_disable():
661 warn("This function is deprecated since IPython 4.0 use disable_gui() instead", DeprecationWarning)
661 warn("This function is deprecated since IPython 4.0 use disable_gui() instead",
662 DeprecationWarning, stacklevel=2)
662 663 inputhook_manager.disable_gui()
664
663 665 disable_wx = disable_qt4 = disable_gtk = disable_gtk3 = disable_glut = \
664 666 disable_pyglet = disable_osx = _deprecated_disable
@@ -77,8 +77,8 b' def apply_wrapper(wrapper,func):'
77 77 This will ensure that wrapped functions can still be well introspected via
78 78 IPython, for example.
79 79 """
80 warnings.warn("The function `apply_wrapper` is deprecated and might be removed in IPython 5.0", DeprecationWarning)
81
80 warnings.warn("The function `apply_wrapper` is deprecated since IPython 4.0",
81 DeprecationWarning, stacklevel=2)
82 82 import nose.tools
83 83
84 84 return decorator(wrapper,nose.tools.make_decorator(func)(wrapper))
@@ -129,7 +129,8 b' def make_label_dec(label,ds=None):'
129 129 True
130 130 """
131 131
132 warnings.warn("The function `make_label_dec` is deprecated and might be removed in IPython 5.0", DeprecationWarning)
132 warnings.warn("The function `make_label_dec` is deprecated since IPython 4.0",
133 DeprecationWarning, stacklevel=2)
133 134 if isinstance(label, string_types):
134 135 labels = [label]
135 136 else:
@@ -285,7 +286,8 b' def decorated_dummy(dec, name):'
285 286 import IPython.testing.decorators as dec
286 287 setup = dec.decorated_dummy(dec.skip_if_no_x11, __name__)
287 288 """
288 warnings.warn("The function `make_label_dec` is deprecated and might be removed in IPython 5.0", DeprecationWarning)
289 warnings.warn("The function `decorated_dummy` is deprecated since IPython 4.0",
290 DeprecationWarning, stacklevel=2)
289 291 dummy = lambda: None
290 292 dummy.__name__ = name
291 293 return dec(dummy)
@@ -318,7 +320,8 b' skip_if_no_x11 = skipif(_x11_skip_cond, _x11_skip_msg)'
318 320
319 321 # not a decorator itself, returns a dummy function to be used as setup
320 322 def skip_file_no_x11(name):
321 warnings.warn("The function `skip_file_no_x11` is deprecated and might be removed in IPython 5.0", DeprecationWarning)
323 warnings.warn("The function `skip_file_no_x11` is deprecated since IPython 4.0",
324 DeprecationWarning, stacklevel=2)
322 325 return decorated_dummy(skip_if_no_x11, name) if _x11_skip_cond else None
323 326
324 327 # Other skip decorators
@@ -366,7 +369,8 b' def onlyif_any_cmd_exists(*commands):'
366 369 """
367 370 Decorator to skip test unless at least one of `commands` is found.
368 371 """
369 warnings.warn("The function `onlyif_any_cmd_exists` is deprecated and might be removed in IPython 5.0", DeprecationWarning)
372 warnings.warn("The function `onlyif_any_cmd_exists` is deprecated since IPython 4.0",
373 DeprecationWarning, stacklevel=2)
370 374 for cmd in commands:
371 375 if which(cmd):
372 376 return null_deco
@@ -48,6 +48,16 b" warnings.filterwarnings('error', message='.*', category=ResourceWarning, module="
48 48 warnings.filterwarnings('error', message=".*{'config': True}.*", category=DeprecationWarning, module='IPy.*')
49 49 warnings.filterwarnings('default', message='.*', category=Warning, module='IPy.*')
50 50
51 warnings.filterwarnings('error', message='.*apply_wrapper.*', category=DeprecationWarning, module='.*')
52 warnings.filterwarnings('error', message='.*make_label_dec', category=DeprecationWarning, module='.*')
53 warnings.filterwarnings('error', message='.*decorated_dummy.*', category=DeprecationWarning, module='.*')
54 warnings.filterwarnings('error', message='.*skip_file_no_x11.*', category=DeprecationWarning, module='.*')
55 warnings.filterwarnings('error', message='.*onlyif_any_cmd_exists.*', category=DeprecationWarning, module='.*')
56
57 warnings.filterwarnings('error', message='.*disable_gui.*', category=DeprecationWarning, module='.*')
58
59 warnings.filterwarnings('error', message='.*ExceptionColors global is deprecated.*', category=DeprecationWarning, module='.*')
60
51 61 if version_info < (6,):
52 62 # nose.tools renames all things from `camelCase` to `snake_case` which raise an
53 63 # warning with the runner they also import from standard import library. (as of Dec 2015)
General Comments 0
You need to be logged in to leave comments. Login now