1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 19:01:15 +01:00
Commit Graph

8 Commits

Author SHA1 Message Date
Sergei Trofimov
97a397d5c8 ipython utils: handle ancient versions of IPython
Very old versions of IPython do not have IPython.version_info attribute
that the ultls module relied on. This commit changes it to use the more
standard __version__ attriute that is present in all versions.
2015-04-24 10:56:23 +01:00
Javi Merino
e30386ce4a Add ipython version 3 support for the generic ipython support 2015-04-17 19:00:55 +01:00
Javi Merino
d12f5c65e1 Factor out the parsing of a valid cell run in the generic ipython implementation
run_cell() becomes more complicated when we add ipython version 3
support which upsets pylint because there are "too many
branches (15/12)".  Factor out part of the function to make pylint
happy.
2015-04-17 18:56:57 +01:00
Javi Merino
2b04cb38d9 Don't break prematurely when running a cell on an ipython kernel
The kernel may go idle before it processes the next input, which break
the while=True loop in run_cell() early.  Wait for an acknowledgement
of the input we've sent to the kernel before considering an idle
message to mean that the cell has been parsed.
2015-04-17 18:56:57 +01:00
Javi Merino
3bf04735c1 Factor out ipython nbconvert in ipynb_exporter results processor
ipython nbconvert CLI changes between ipython 2 and 3, so keep the
string separate so that we can update when we add ipython version 3 support.
2015-04-17 17:52:07 +01:00
Javi Merino
f54bb0981f Don't use shell_channel in ipynb_exporter result processor
It's not needed for IPython 2 and it breaks in IPython 3
2015-04-17 17:52:07 +01:00
Javi Merino
f41be396fa Use notebook format 3 for ipynb_exporter
The file assumes format 3 throughout the code, so explicitly import that
format instead of the generic "current" format.
2015-04-17 17:52:07 +01:00
Javi Merino
d31a5c3c48 Factor out the ipython implementation in ipynb_exporter
The internal ABI for ipython has changed between ipython version 2 and
3.  In its current state, the result processor only works with IPython
version 2, so fail if the user wants to use the result processor with
the wrong version.

Abstract the ipython interface to a file so that we can make it support
versions 2 and 3 at the same time.
2015-04-17 17:52:07 +01:00