[accerciser] IPython: use traitlets.config instead of IPython.config
- From: Samuel Thibault <sthibaul src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [accerciser] IPython: use traitlets.config instead of IPython.config
- Date: Mon, 1 Apr 2019 16:31:14 +0000 (UTC)
commit 9f83d922a2c1357ccf028822d7806e9076b25102
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date: Mon Apr 1 18:30:17 2019 +0200
IPython: use traitlets.config instead of IPython.config
as the latter is deprecated since IPython 4.0.
Fixes #4
plugins/ipython_view.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/plugins/ipython_view.py b/plugins/ipython_view.py
index ae3d2be..f7355d4 100755
--- a/plugins/ipython_view.py
+++ b/plugins/ipython_view.py
@@ -91,7 +91,10 @@ class IterableIPShell:
os.environ['TERM'] = 'dumb'
excepthook = sys.excepthook
- from IPython.config.loader import Config
+ if parse_version(IPython.release.version) >= parse_version('4.0.0'):
+ from traitlets.config.loader import Config
+ else:
+ from IPython.config.loader import Config
cfg = Config()
cfg.InteractiveShell.colors = "Linux"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]