freelance-project-34-market.../deps/ipython-fork/IPython/terminal/console.py
Siarhei Siniak 1530fcf108 [~] Fork ipython
1. 7f51a0332edd0c675c2d314ca3e62df7ef041281 deps/ipython (8.4.0-33-g7f51a0332)
2022-08-27 13:02:12 +03:00

20 lines
691 B
Python

"""
Shim to maintain backwards compatibility with old IPython.terminal.console imports.
"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import sys
from warnings import warn
from IPython.utils.shimmodule import ShimModule, ShimWarning
warn("The `IPython.terminal.console` package has been deprecated since IPython 4.0. "
"You should import from jupyter_console instead.", ShimWarning)
# Unconditionally insert the shim into sys.modules so that further import calls
# trigger the custom attribute access above
sys.modules['IPython.terminal.console'] = ShimModule(
src='IPython.terminal.console', mirror='jupyter_console')