From e0e3e1717e3d33762ce61950504f9637a6e669ed Mon Sep 17 00:00:00 2001
From: nkozlovskiy <nmk@ydb.tech>
Date: Fri, 29 Sep 2023 12:24:06 +0300
Subject: add ydb deps

---
 contrib/python/ipython/py2/IPython/nbconvert.py | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 contrib/python/ipython/py2/IPython/nbconvert.py

(limited to 'contrib/python/ipython/py2/IPython/nbconvert.py')

diff --git a/contrib/python/ipython/py2/IPython/nbconvert.py b/contrib/python/ipython/py2/IPython/nbconvert.py
new file mode 100644
index 0000000000..2de4ee50bc
--- /dev/null
+++ b/contrib/python/ipython/py2/IPython/nbconvert.py
@@ -0,0 +1,19 @@
+"""
+Shim to maintain backwards compatibility with old IPython.nbconvert 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.nbconvert` package has been deprecated since IPython 4.0. "
+     "You should import from nbconvert instead.", ShimWarning)
+
+# Unconditionally insert the shim into sys.modules so that further import calls
+# trigger the custom attribute access above
+
+sys.modules['IPython.nbconvert'] = ShimModule(
+    src='IPython.nbconvert', mirror='nbconvert')
-- 
cgit v1.2.3