You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
651 B

4 years ago
  1. """
  2. Shim to maintain backwards compatibility with old IPython.nbconvert imports.
  3. """
  4. # Copyright (c) IPython Development Team.
  5. # Distributed under the terms of the Modified BSD License.
  6. import sys
  7. from warnings import warn
  8. from IPython.utils.shimmodule import ShimModule, ShimWarning
  9. warn("The `IPython.nbconvert` package has been deprecated since IPython 4.0. "
  10. "You should import from nbconvert instead.", ShimWarning)
  11. # Unconditionally insert the shim into sys.modules so that further import calls
  12. # trigger the custom attribute access above
  13. sys.modules['IPython.nbconvert'] = ShimModule(
  14. src='IPython.nbconvert', mirror='nbconvert')