Hello community,

here is the log from the commit of package python-pyviz-comms for 
openSUSE:Factory checked in at 2019-05-07 23:16:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pyviz-comms (Old)
 and      /work/SRC/openSUSE:Factory/.python-pyviz-comms.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pyviz-comms"

Tue May  7 23:16:18 2019 rev:3 rq:696878 version:0.7.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pyviz-comms/python-pyviz-comms.changes    
2019-01-21 10:45:57.784341807 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-pyviz-comms.new.5148/python-pyviz-comms.changes
  2019-05-07 23:16:19.528574271 +0200
@@ -1,0 +2,6 @@
+Mon Apr 22 19:21:30 UTC 2019 - Todd R <[email protected]>
+
+- Update to version 0.7.2
+  * Custom MIME type rendering now executes script tags in HTML
+
+-------------------------------------------------------------------

Old:
----
  pyviz_comms-0.7.0.tar.gz

New:
----
  pyviz_comms-0.7.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pyviz-comms.spec ++++++
--- /var/tmp/diff_new_pack.URnPc9/_old  2019-05-07 23:16:20.104575604 +0200
+++ /var/tmp/diff_new_pack.URnPc9/_new  2019-05-07 23:16:20.104575604 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pyviz-comms
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,12 +12,12 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pyviz-comms
-Version:        0.7.0
+Version:        0.7.2
 Release:        0
 License:        BSD-3-Clause
 Summary:        Tool to launch jobs, organize the output, and dissect the 
results

++++++ pyviz_comms-0.7.0.tar.gz -> pyviz_comms-0.7.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyviz_comms-0.7.0/MANIFEST.in 
new/pyviz_comms-0.7.2/MANIFEST.in
--- old/pyviz_comms-0.7.0/MANIFEST.in   2018-12-24 19:56:32.000000000 +0100
+++ new/pyviz_comms-0.7.2/MANIFEST.in   2019-03-23 22:06:11.000000000 +0100
@@ -1,3 +1,4 @@
 include README.md
 include LICENSE.txt
-include pyviz_comms/.version
\ No newline at end of file
+include pyviz_comms/.version
+include pyviz_comms/notebook.js
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyviz_comms-0.7.0/PKG-INFO 
new/pyviz_comms-0.7.2/PKG-INFO
--- old/pyviz_comms-0.7.0/PKG-INFO      2018-12-24 20:03:56.000000000 +0100
+++ new/pyviz_comms-0.7.2/PKG-INFO      2019-03-23 22:08:22.000000000 +0100
@@ -1,12 +1,12 @@
 Metadata-Version: 2.1
 Name: pyviz_comms
-Version: 0.7.0
-Summary: Launch jobs, organize the output, and dissect the results.
+Version: 0.7.2
+Summary: Bidirectional communication for the PyViz ecosystem.
 Home-page: http://pyviz.org
 Author: PyViz developers
 Author-email: 
 Maintainer: PyViz
-Maintainer-email: [email protected]
+Maintainer-email: [email protected]
 License: BSD
 Description: # pyviz_comms
         
@@ -43,8 +43,8 @@
         | JupyterLab    | jupyterlab_pyviz |
         | ------------- | ---------------- |
         | 0.33.x        | 0.6.0            |
-        | 0.34.x        | 0.6.1            |
-        | 0.35.x        | 0.6.3            |
+        | 0.34.x        | 0.6.1-0.6.2      |
+        | 0.35.x        | 0.6.3-0.7.1      |
         
         ## Developing the Jupyterlab extension
         
@@ -82,3 +82,6 @@
 Classifier: Topic :: Scientific/Engineering
 Classifier: Topic :: Software Development :: Libraries
 Description-Content-Type: text/markdown
+Provides-Extra: build
+Provides-Extra: tests
+Provides-Extra: all
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyviz_comms-0.7.0/README.md 
new/pyviz_comms-0.7.2/README.md
--- old/pyviz_comms-0.7.0/README.md     2018-12-24 19:56:32.000000000 +0100
+++ new/pyviz_comms-0.7.2/README.md     2019-03-23 22:06:11.000000000 +0100
@@ -33,8 +33,8 @@
 | JupyterLab    | jupyterlab_pyviz |
 | ------------- | ---------------- |
 | 0.33.x        | 0.6.0            |
-| 0.34.x        | 0.6.1            |
-| 0.35.x        | 0.6.3            |
+| 0.34.x        | 0.6.1-0.6.2      |
+| 0.35.x        | 0.6.3-0.7.1      |
 
 ## Developing the Jupyterlab extension
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyviz_comms-0.7.0/pyviz_comms/.version 
new/pyviz_comms-0.7.2/pyviz_comms/.version
--- old/pyviz_comms-0.7.0/pyviz_comms/.version  2018-12-24 20:03:56.000000000 
+0100
+++ new/pyviz_comms-0.7.2/pyviz_comms/.version  2019-03-23 22:08:22.000000000 
+0100
@@ -1 +1 @@
-{"git_describe": "v0.7.0-0-g3c101fc", "version_string": "0.7.0"}
\ No newline at end of file
+{"git_describe": "v0.7.2-0-g9f7a469", "version_string": "0.7.2"}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyviz_comms-0.7.0/pyviz_comms/__init__.py 
new/pyviz_comms-0.7.2/pyviz_comms/__init__.py
--- old/pyviz_comms-0.7.0/pyviz_comms/__init__.py       2018-12-24 
19:56:32.000000000 +0100
+++ new/pyviz_comms-0.7.2/pyviz_comms/__init__.py       2019-03-23 
22:06:11.000000000 +0100
@@ -1,10 +1,8 @@
 import os
 import sys
-import json
 import uuid
 import traceback
 
-
 try:
     from StringIO import StringIO
 except:
@@ -32,26 +30,35 @@
     # A registry of actions to perform when a delete event is received
     _delete_actions = []
 
+    # A registry of actions to perform when a server delete event is received
+    _server_delete_actions = []
+
     @classmethod
     def add_delete_action(cls, action):
         cls._delete_actions.append(action)
 
     @classmethod
+    def add_server_delete_action(cls, action):
+        cls._server_delete_actions.append(action)
+
+    @classmethod
     def _process_comm_msg(cls, msg):
         """
         Processes comm messages to handle global actions such as
         cleaning up plots.
         """
-        if msg['event_type'] != 'delete':
-            return
-
-        for action in cls._delete_actions:
-            action(msg['id'])
+        event_type = msg['event_type']
+        if event_type == 'delete':
+            for action in cls._delete_actions:
+                action(msg['id'])
+        elif event_type == 'server_delete':
+            for action in cls._server_delete_actions:
+                action(msg['id'])
 
 
 PYVIZ_PROXY = """
-if (window.PyViz === undefined) {
-   if (window.HoloViews === undefined) {
+if ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {
+   if ((window.HoloViews === undefined) || (window.HoloViews instanceof 
HTMLElement)) {
      var PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, 
plot_index: []}
    } else {
      var PyViz = window.HoloViews;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyviz_comms-0.7.0/pyviz_comms/notebook.js 
new/pyviz_comms-0.7.2/pyviz_comms/notebook.js
--- old/pyviz_comms-0.7.0/pyviz_comms/notebook.js       2018-12-24 
19:56:32.000000000 +0100
+++ new/pyviz_comms-0.7.2/pyviz_comms/notebook.js       2019-03-23 
22:06:11.000000000 +0100
@@ -26,14 +26,47 @@
   var toinsert = output_area.element.find("." + CLASS_NAME.split(' ')[0]);
   if (id !== undefined) {
     var nchildren = toinsert.length;
-    toinsert[nchildren-1].children[0].innerHTML = output.data[HTML_MIME_TYPE];
-    toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];
+    var html_node = toinsert[nchildren-1].children[0];
+    html_node.innerHTML = output.data[HTML_MIME_TYPE];
+    var scripts = [];
+    var nodelist = html_node.querySelectorAll("script");
+    for (var i in nodelist) {
+      if (nodelist.hasOwnProperty(i)) {
+        scripts.push(nodelist[i])
+      }
+    }
+
+    scripts.forEach( function (oldScript) {
+      var newScript = document.createElement("script");
+      var attrs = [];
+      var nodemap = oldScript.attributes;
+      for (var j in nodemap) {
+        if (nodemap.hasOwnProperty(j)) {
+          attrs.push(nodemap[j])
+        }
+      }
+      attrs.forEach(function(attr) { newScript.setAttribute(attr.name, 
attr.value) });
+      newScript.appendChild(document.createTextNode(oldScript.innerHTML));
+      oldScript.parentNode.replaceChild(newScript, oldScript);
+    });
+    if (JS_MIME_TYPE in output.data) {
+      toinsert[nchildren-1].children[1].textContent = 
output.data[JS_MIME_TYPE];
+    }
     output_area._hv_plot_id = id;
     if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {
       window.PyViz.plot_index[id] = Bokeh.index[id];
     } else {
       window.PyViz.plot_index[id] = null;
     }
+  } else if (output.metadata[EXEC_MIME_TYPE]["server_id"] !== undefined) {
+    var bk_div = document.createElement("div");
+    bk_div.innerHTML = output.data[HTML_MIME_TYPE];
+    var script_attrs = bk_div.children[0].attributes;
+    for (var i = 0; i < script_attrs.length; i++) {
+      toinsert[toinsert.length - 
1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);
+    }
+    // store reference to server id on output_area
+    output_area._bokeh_server_id = 
output.metadata[EXEC_MIME_TYPE]["server_id"];
   }
 }
 
@@ -42,9 +75,13 @@
  */
 function handle_clear_output(event, handle) {
   var id = handle.cell.output_area._hv_plot_id;
-  if ((id === undefined) || !(id in PyViz.plot_index)) { return; }
+  var server_id = handle.cell.output_area._bokeh_server_id;
+  if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== 
undefined)) { return; }
   var comm = window.PyViz.comm_manager.get_client_comm("hv-extension-comm", 
"hv-extension-comm", function () {});
-  if (comm !== null) {
+  if (server_id !== null) {
+    comm.send({event_type: 'server_delete', 'id': server_id});
+    return;
+  } else if (comm !== null) {
     comm.send({event_type: 'delete', 'id': id});
   }
   delete PyViz.plot_index[id];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyviz_comms-0.7.0/pyviz_comms.egg-info/PKG-INFO 
new/pyviz_comms-0.7.2/pyviz_comms.egg-info/PKG-INFO
--- old/pyviz_comms-0.7.0/pyviz_comms.egg-info/PKG-INFO 2018-12-24 
20:03:56.000000000 +0100
+++ new/pyviz_comms-0.7.2/pyviz_comms.egg-info/PKG-INFO 2019-03-23 
22:08:22.000000000 +0100
@@ -1,12 +1,12 @@
 Metadata-Version: 2.1
 Name: pyviz-comms
-Version: 0.7.0
-Summary: Launch jobs, organize the output, and dissect the results.
+Version: 0.7.2
+Summary: Bidirectional communication for the PyViz ecosystem.
 Home-page: http://pyviz.org
 Author: PyViz developers
 Author-email: 
 Maintainer: PyViz
-Maintainer-email: [email protected]
+Maintainer-email: [email protected]
 License: BSD
 Description: # pyviz_comms
         
@@ -43,8 +43,8 @@
         | JupyterLab    | jupyterlab_pyviz |
         | ------------- | ---------------- |
         | 0.33.x        | 0.6.0            |
-        | 0.34.x        | 0.6.1            |
-        | 0.35.x        | 0.6.3            |
+        | 0.34.x        | 0.6.1-0.6.2      |
+        | 0.35.x        | 0.6.3-0.7.1      |
         
         ## Developing the Jupyterlab extension
         
@@ -82,3 +82,6 @@
 Classifier: Topic :: Scientific/Engineering
 Classifier: Topic :: Software Development :: Libraries
 Description-Content-Type: text/markdown
+Provides-Extra: build
+Provides-Extra: tests
+Provides-Extra: all
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyviz_comms-0.7.0/pyviz_comms.egg-info/requires.txt 
new/pyviz_comms-0.7.2/pyviz_comms.egg-info/requires.txt
--- old/pyviz_comms-0.7.0/pyviz_comms.egg-info/requires.txt     2018-12-24 
20:03:56.000000000 +0100
+++ new/pyviz_comms-0.7.2/pyviz_comms.egg-info/requires.txt     2019-03-23 
22:08:22.000000000 +0100
@@ -1 +1,15 @@
 param
+
+[all]
+flake8
+nose
+param>=1.7.0
+setuptools
+
+[build]
+param>=1.7.0
+setuptools
+
+[tests]
+flake8
+nose
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyviz_comms-0.7.0/setup.py 
new/pyviz_comms-0.7.2/setup.py
--- old/pyviz_comms-0.7.0/setup.py      2018-12-24 19:56:32.000000000 +0100
+++ new/pyviz_comms-0.7.2/setup.py      2019-03-23 22:06:11.000000000 +0100
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-import sys, os
+import os
 try:
     from setuptools import setup
 except ImportError:
@@ -26,24 +26,32 @@
         return json.load(open(version_file_path, 'r'))['version_string']
 
 
+extras_require = {
+    'tests': ['flake8', 'nose'], # nose required due to pip_on_conda
+    'build': ['param >=1.7.0', 'setuptools']
+}
+
+extras_require['all'] = sorted(set(sum(extras_require.values(), [])))
+
 install_requires = ['param']
-setup_args = {}
-setup_args.update(dict(
+setup_args = dict(
     name='pyviz_comms',
     version=get_setup_version("pyviz_comms"),
     install_requires = install_requires,
-    description='Launch jobs, organize the output, and dissect the results.',
+    extras_require=extras_require,
+    tests_require=extras_require['tests'],
+    description='Bidirectional communication for the PyViz ecosystem.',
     long_description=open('README.md').read() if os.path.isfile('README.md') 
else 'Consult README.md',
     long_description_content_type="text/markdown",
     author= "PyViz developers",
     author_email= "",
     maintainer= "PyViz",
-    maintainer_email= "[email protected]",
+    maintainer_email= "[email protected]",
     platforms=['Windows', 'Mac OS X', 'Linux'],
     license='BSD',
     url='http://pyviz.org',
     packages = ["pyviz_comms"],
-    package_data={'pyviz_comms': ['.version', 'notebook.js']},
+    include_package_data=True,
     classifiers = [
         "License :: OSI Approved :: BSD License",
         "Development Status :: 5 - Production/Stable",
@@ -56,7 +64,7 @@
         "Natural Language :: English",
         "Topic :: Scientific/Engineering",
         "Topic :: Software Development :: Libraries"]
-))
+)
 
 
 if __name__=="__main__":


Reply via email to