diff --git a/IPython/utils/contexts.py b/IPython/utils/contexts.py index fcc97d7..567a753 100644 --- a/IPython/utils/contexts.py +++ b/IPython/utils/contexts.py @@ -2,6 +2,8 @@ """Miscellaneous context managers. """ +import warnings + # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. @@ -59,6 +61,13 @@ class preserve_keys(object): class NoOpContext(object): - """Context manager that does nothing.""" + """ + Deprecated + + Context manager that does nothing.""" + + def __init__(self): + warnings.warn("""NoOpContext is deprecated since IPython 5.0 """) + def __enter__(self): pass def __exit__(self, type, value, traceback): pass