@contextlib.contextmanager
def _ignore_deprecated_imports(ignore=True):
    if ignore:
        with warnings.catch_warnings():
            warnings.filterwarnings("ignore", ".+ (module|package)",
                                    DeprecationWarning)
            yield
    else:
        yield
Context manager to suppress package and module deprecation
dataset/ETHPy150Open OpenCobolIDE/OpenCobolIDE/open_cobol_ide/extlibs/future/backports/test/support.py/_ignore_deprecated_imports