Commit a7a08a93 authored by Anton Gladky's avatar Anton Gladky

Fix ipython5 config module.

parent e5984761
Description: Fix ipython5 config module
Author: Anton Gladky <gladk@debian.org>
Last-Update: 2016-12-10
--- yade-2016.06a.orig/core/main/main.py.in
+++ yade-2016.06a/core/main/main.py.in
@@ -228,9 +228,14 @@ def userSession(gui='none',qapp=None):
from IPython.terminal.embed import InteractiveShellEmbed
else:
from IPython.frontend.terminal.embed import InteractiveShellEmbed
- from IPython.config.loader import Config
- cfg = Config()
- prompt_config = cfg.PromptManager
+ if yade.runtime.ipython_version>=500:
+ from traitlets.config.loader import Config
+ cfg = Config()
+ prompt_config = cfg.TerminalInteractiveShell.prompts_class
+ else:
+ from IPython.config.loader import Config
+ cfg = Config()
+ prompt_config = cfg.PromptManager
prompt_config.in_template = ipconfig['prompt_in1']
prompt_config.in2_template = ipconfig['prompt_in2']
prompt_config.out_template = ipconfig['prompt_out']
......@@ -3,3 +3,4 @@
06_fixCrash.patch
07_ipython5.patch
08_fix-FTBFS-bosst162.patch
10_ipython5_fix.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment