gnucash maint: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Sun Apr 5 18:17:05 EDT 2020


Updated	 via  https://github.com/Gnucash/gnucash/commit/3b381f25 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/6c086d1f (commit)
	from  https://github.com/Gnucash/gnucash/commit/640171c2 (commit)



commit 3b381f25c3b07ea6c1e66a812c682ed86456d5fd
Merge: 640171c21 6c086d1f8
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Apr 5 15:16:05 2020 -0700

    Merge Chris Mayo's iPython-fixes into maint.


commit 6c086d1f8bf144f96b43ee72997c7c484cb4fde2
Author: Chris Mayo <aklhfex at gmail.com>
Date:   Fri Apr 3 19:12:36 2020 +0100

    Make pycons/ishell.py compatible with Python 3 and current IPython

diff --git a/gnucash/python/pycons/ishell.py b/gnucash/python/pycons/ishell.py
index 93612ce67..52f2335e1 100644
--- a/gnucash/python/pycons/ishell.py
+++ b/gnucash/python/pycons/ishell.py
@@ -16,12 +16,11 @@
 import os
 import sys
 import re
-from StringIO import StringIO
+from io import StringIO
 try:
     import IPython
-    from IPython import ipapi
-except Exception,e:
-    raise "Error importing IPython (%s)" % str(e)
+except Exception as e:
+    raise Exception("Error importing IPython (%s)" % str(e))
 
 
 # ------------------------------------------------------------------ class Shell
@@ -54,11 +53,11 @@ class Shell:
                                                 header='IPython system call: ',
                                                 verbose=self.IP.rc.system_verbose)
         # Get a hold of the public IPython API object and use it
-        self.ip = ipapi.get()
+        self.ip = IPython.core.getipython.get_ipython()
         self.ip.magic('colors LightBG')                
         sys.excepthook = excepthook
         self.iter_more = 0
-        self.complete_sep =  re.compile('[\s\{\}\[\]\(\)]')
+        self.complete_sep =  re.compile(r'[\s\{\}\[\]\(\)]')
 
 
     def namespace(self):



Summary of changes:
 gnucash/python/pycons/ishell.py | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)



More information about the gnucash-changes mailing list