zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject zeppelin git commit: [HOTFIX][ZEPPELIN-1656] z.show in Python interpreter does not work
Date Mon, 14 Nov 2016 00:08:42 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/master aded8681b -> f7af21e21

[HOTFIX][ZEPPELIN-1656] z.show in Python interpreter does not work

### What is this PR for?
There have been reports of #1534 causing the python interpreter to always show an error because
`z` is not being set. As it turns out this is a result of improperly handling the case when
matplotlib isn't found when initializing the interpreter.

### What type of PR is it?
Bug Fix

### What is the Jira issue?

### How should this be tested?
Run any simple python paragraph.

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Alex Goodman <agoodm@users.noreply.github.com>

Closes #1628 from agoodm/patch-1 and squashes the following commits:

67f2ad5 [Alex Goodman] python interpeter should work when matplotlib is not installed
0a7a9d7 [Alex Goodman] Fix indent in bootstrap.py

Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/f7af21e2
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/f7af21e2
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/f7af21e2

Branch: refs/heads/master
Commit: f7af21e2197cb4d106fdb66fde016120d4d5748d
Parents: aded868
Author: Alex Goodman <agoodm@users.noreply.github.com>
Authored: Sun Nov 13 15:48:29 2016 -0800
Committer: Alexander Bezzubov <bzz@apache.org>
Committed: Mon Nov 14 01:08:36 2016 +0100

 python/src/main/resources/bootstrap.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/python/src/main/resources/bootstrap.py b/python/src/main/resources/bootstrap.py
index 6cbf6e4..0a20a34 100644
--- a/python/src/main/resources/bootstrap.py
+++ b/python/src/main/resources/bootstrap.py
@@ -207,7 +207,7 @@ class PyZeppelinContext(object):
             import matplotlib
         except ImportError:
-            pass
+            return
         # Make sure custom backends are available in the PYTHONPATH
         rootdir = os.environ.get('ZEPPELIN_HOME', os.getcwd())
         mpl_path = os.path.join(rootdir, 'interpreter', 'lib', 'python')
@@ -218,7 +218,7 @@ class PyZeppelinContext(object):
             import backend_zinline
             # Everything looks good so make config assuming that we are using
             # an inline backend
             self._displayhook = backend_zinline.displayhook

View raw message