Bug 1981

Summary: PyViz shell not compatible with ipython >= 0.11
Product: ns-3 Reporter: Kristian A. Hiorth <kristahi>
Component: visualizerAssignee: Gustavo J. A. M. Carneiro <gjcarneiro>
Status: RESOLVED FIXED    
Severity: normal CC: ns-bugs, tomh, tommaso.pecorella
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: Linux   
Attachments: Update IPythonView class and shell integration code to support modern ipython

Description Kristian A. Hiorth 2014-09-11 10:13:16 UTC
Created attachment 1873 [details]
Update IPythonView class and shell integration code to support modern ipython

IPython has undergone several stages of backwards incompatible API reorganization since at least version 0.11.

This breaks the ipython shell feature of the PyViz module.

When working with ns-3 earlier this year I wanted to use that feature, so I went ahead and tried to update the code. I found out that the GNOME Accerciser guys, who wrote the IPythonView class the shell is based on, had updated their code so as to be compatible with modern IPython. However, they have also migrated to Python 3 and done some other things, so I "backported" their changes to Python 2.x and made adaptions to make the ns-3 integration work.

Attached is a patch against HEAD. I've tested it without any problems, but not exhaustively. Please tell me if I've done anything wrong or undesireable and I'll fix it.

Tested against Python 2.7.8 and IPython 2.2.0.
Comment 1 Tom Henderson 2014-09-11 13:31:47 UTC
Thanks for submitting this.

Gustavo, is this something you can test and evaluate whether we can slip it into this release (merge in the next couple of days)?
Comment 2 Gustavo J. A. M. Carneiro 2014-09-11 15:18:10 UTC
(In reply to Tom Henderson from comment #1)
> Thanks for submitting this.
> 
> Gustavo, is this something you can test and evaluate whether we can slip it
> into this release (merge in the next couple of days)?

Indeed.  I tested the patch, saw that it works, then pushed it to ns-3-dev.  Feel free to cherry-pick into the release branch.

Thank you, Kristian!
Comment 3 Tommaso Pecorella 2014-09-11 16:03:33 UTC
Fixed in changeset 10919:cdec2526daf3