From c04b98c75a2e629eb0ff19970715ca689b6323f6 Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Wed, 2 Sep 2015 17:39:11 +0100 Subject: [PATCH] ipython: updated version check. Version 4.0.0 changes API and breaks WA's usage of it. Updated version check to only initialize ipython utils if version is < 4.0.0. --- wlauto/utils/ipython.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wlauto/utils/ipython.py b/wlauto/utils/ipython.py index 74802c71..250151f4 100644 --- a/wlauto/utils/ipython.py +++ b/wlauto/utils/ipython.py @@ -34,7 +34,7 @@ NBFORMAT_VERSION = 3 if IPython: - if StrictVersion(IPython.__version__) >= StrictVersion('3.0.0'): + if StrictVersion('4.0.0') > StrictVersion(IPython.__version__) >= StrictVersion('3.0.0'): import IPython.kernel import IPython.nbformat @@ -48,7 +48,7 @@ if IPython: IPYTHON_NBCONVERT_HTML = ['ipython', 'nbconvert', '--to=html'] IPYTHON_NBCONVERT_PDF = ['ipython', 'nbconvert', '--to=pdf'] - elif StrictVersion(IPython.__version__) >= StrictVersion('2.0.0'): + elif StrictVersion('3.0.0') > StrictVersion(IPython.__version__) >= StrictVersion('2.0.0'): import IPython.kernel import IPython.nbformat.v3