From a2d8523e3427d14f8352224184bbdb1c40f162c9 2017-01-07 14:36:32 From: Srinivas Reddy Thatiparthy Date: 2017-01-07 14:36:32 Subject: [PATCH] import StringIO from io package --- diff --git a/IPython/sphinxext/ipython_directive.py b/IPython/sphinxext/ipython_directive.py index 29edc00..8052b0d 100644 --- a/IPython/sphinxext/ipython_directive.py +++ b/IPython/sphinxext/ipython_directive.py @@ -133,7 +133,7 @@ import tempfile import ast import warnings import shutil - +from io import StringIO # Third-party from docutils.parsers.rst import directives @@ -144,12 +144,6 @@ from traitlets.config import Config from IPython import InteractiveShell from IPython.core.profiledir import ProfileDir from IPython.utils import io -from IPython.utils.py3compat import PY3 - -if PY3: - from io import StringIO -else: - from StringIO import StringIO #----------------------------------------------------------------------------- # Globals