Hello community,

here is the log from the commit of package jupyter-jupyterlab-server for 
openSUSE:Factory checked in at 2020-05-26 17:21:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/jupyter-jupyterlab-server (Old)
 and      /work/SRC/openSUSE:Factory/.jupyter-jupyterlab-server.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "jupyter-jupyterlab-server"

Tue May 26 17:21:57 2020 rev:3 rq:808518 version:1.1.5

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/jupyter-jupyterlab-server/jupyter-jupyterlab-server.changes
      2019-08-22 10:52:57.425695178 +0200
+++ 
/work/SRC/openSUSE:Factory/.jupyter-jupyterlab-server.new.2738/jupyter-jupyterlab-server.changes
    2020-05-26 17:22:10.680343416 +0200
@@ -1,0 +2,9 @@
+Sun May 24 08:18:38 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Update to 1.1.5:
+  * Clean up terminate logic. #91
+  * Kill the subprocess if it does not stop. #86
+  * Do not try to close the watch process file handle. #85
+  * Update nodejs error message to not give an outdated version. #84
+
+-------------------------------------------------------------------

Old:
----
  jupyterlab_server-1.0.6.tar.gz

New:
----
  jupyterlab_server-1.1.5.tar.gz

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

Other differences:
------------------
++++++ jupyter-jupyterlab-server.spec ++++++
--- /var/tmp/diff_new_pack.7DOi9c/_old  2020-05-26 17:22:11.440345050 +0200
+++ /var/tmp/diff_new_pack.7DOi9c/_new  2020-05-26 17:22:11.440345050 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package jupyter-jupyterlab-server
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,12 @@
 
 
 Name:           jupyter-jupyterlab-server
-Version:        1.0.6
+Version:        1.1.5
 Release:        0
 Summary:        Server components for JupyterLab and JupyterLab-like 
applications
 License:        BSD-3-Clause
-Group:          Development/Languages/Python
 URL:            https://github.com/jupyterlab/jupyterlab_server
-Source:         
https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab_server-%{version}.tar.gz
+Source:         
https://files.pythonhosted.org/packages/source/j/jupyterlab_server/jupyterlab_server-%{version}.tar.gz
 Source100:      jupyter-jupyterlab-server-rpmlintrc
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -32,11 +31,12 @@
 Requires:       python3-Jinja2 >= 2.10
 Requires:       python3-base >= 3.5
 Requires:       python3-json5
-Requires:       python3-jsonschema >= 2.6
+Requires:       python3-jsonschema >= 3.0.1
+Requires:       python3-requests
 Provides:       python3-jupyter_jupyterlab_server = %{version}
 Obsoletes:      python3-jupyter_jupyterlab_server < %{version}
-Provides:       python3-jupyterlab-server = %{version}
 Provides:       jupyter-jupyterlab-launcher = %{version}
+Provides:       python3-jupyterlab-server = %{version}
 Obsoletes:      jupyter-jupyterlab-launcher < %{version}
 Provides:       python3-jupyter_jupyterlab_launcher = %{version}
 Obsoletes:      python3-jupyter_jupyterlab_launcher < %{version}
@@ -46,7 +46,7 @@
 BuildRequires:  python3-Jinja2 >= 2.10
 BuildRequires:  python3-base >= 3.5
 BuildRequires:  python3-json5
-BuildRequires:  python3-jsonschema >= 2.6
+BuildRequires:  python3-jsonschema >= 3.0.1
 BuildRequires:  python3-pytest
 BuildRequires:  python3-requests
 # /SECTION
@@ -65,6 +65,7 @@
 %fdupes %{buildroot}%{python3_sitelib}
 
 %check
+export PYTHONDONTWRITEBYTECODE=1
 pytest-%{python3_bin_suffix} -v .
 
 %files

++++++ jupyterlab_server-1.0.6.tar.gz -> jupyterlab_server-1.1.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyterlab_server-1.0.6/PKG-INFO 
new/jupyterlab_server-1.1.5/PKG-INFO
--- old/jupyterlab_server-1.0.6/PKG-INFO        2019-08-20 17:52:31.000000000 
+0200
+++ new/jupyterlab_server-1.1.5/PKG-INFO        2020-05-23 11:48:53.843516800 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: jupyterlab_server
-Version: 1.0.6
+Version: 1.1.5
 Summary: JupyterLab Server
 Home-page: https://jupyter.org
 Author: Jupyter Development Team
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jupyterlab_server-1.0.6/jupyterlab_server/_version.py 
new/jupyterlab_server-1.1.5/jupyterlab_server/_version.py
--- old/jupyterlab_server-1.0.6/jupyterlab_server/_version.py   2019-08-20 
17:52:28.000000000 +0200
+++ new/jupyterlab_server-1.1.5/jupyterlab_server/_version.py   2020-05-23 
11:48:47.000000000 +0200
@@ -1,2 +1,2 @@
-version_info = (1, 0, 6)
+version_info = (1, 1, 5)
 __version__ = '.'.join(map(str, version_info[:3])) + ''.join(map(str, 
version_info[3:]))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyterlab_server-1.0.6/jupyterlab_server/app.py 
new/jupyterlab_server-1.1.5/jupyterlab_server/app.py
--- old/jupyterlab_server-1.0.6/jupyterlab_server/app.py        2019-08-17 
12:37:31.000000000 +0200
+++ new/jupyterlab_server-1.1.5/jupyterlab_server/app.py        2020-05-23 
11:48:35.000000000 +0200
@@ -4,7 +4,7 @@
 # Copyright (c) Jupyter Development Team.
 # Distributed under the terms of the Modified BSD License.
 
-from traitlets import Unicode
+from traitlets import Unicode, Integer, Dict
 
 from .server import ServerApp
 from .handlers import add_handlers, LabConfig
@@ -17,6 +17,19 @@
 
     lab_config = LabConfig()
 
+    blacklist_uris = Unicode('', config=True,
+        help="A list of comma-separated URIs to get the blacklist")
+
+    whitelist_uris = Unicode('', config=True,
+        help="A list of comma-separated URIs to get the whitelist")
+
+    listings_refresh_seconds = Integer(60 * 60, config=True,
+        help="The interval delay in seconds to refresh the lists")
+
+    listings_request_options = Dict({}, config=True,
+        help="The optional kwargs to use for the listings HTTP requests \
+            as described on 
https://2.python-requests.org/en/v2.7.0/api/#requests.request";)
+
     def start(self):
         add_handlers(self.web_app, self.lab_config)
         super().start()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jupyterlab_server-1.0.6/jupyterlab_server/handlers.py 
new/jupyterlab_server-1.1.5/jupyterlab_server/handlers.py
--- old/jupyterlab_server-1.0.6/jupyterlab_server/handlers.py   2019-08-17 
12:37:31.000000000 +0200
+++ new/jupyterlab_server-1.1.5/jupyterlab_server/handlers.py   2020-05-23 
11:48:35.000000000 +0200
@@ -15,6 +15,7 @@
 from .server import JupyterHandler, FileFindHandler, url_path_join as ujoin
 from .workspaces_handler import WorkspacesHandler
 from .settings_handler import SettingsHandler
+from .listings_handler import ListingsHandler, fetch_listings
 from .themes_handler import ThemesHandler
 
 # -----------------------------------------------------------------------------
@@ -90,7 +91,10 @@
             if not name.endswith('_url'):
                 continue
             full_name = _camelCase('full_' + name)
-            full_url = ujoin(base_url, getattr(config, name))
+            full_url = getattr(config, name)
+            if not is_url(full_url):
+                # Relative URL will be prefixed with base_url
+                full_url = ujoin(base_url, full_url)
             page_config[full_name] = full_url
 
         # Load the current page config file if available.
@@ -160,6 +164,8 @@
 
     workspaces_url = Unicode(help='The url path of the workspaces handler.')
 
+    listings_url = Unicode(help='The listings url.')
+
     themes_url = Unicode(help='The theme url.')
 
     themes_dir = Unicode('',
@@ -189,6 +195,10 @@
     def _default_settings_url(self):
         return ujoin(self.app_url, 'api', 'settings/')
 
+    @default('listings_url')
+    def _default_listings_url(self):
+        return ujoin(self.app_url, 'api', 'listings/')
+
     @default('themes_url')
     def _default_themes_url(self):
         return ujoin(self.app_url, 'api', 'themes/')
@@ -289,6 +299,40 @@
         handlers.append((
             workspace_api_path, WorkspacesHandler, workspaces_config))
 
+    # Handle local listings.
+
+    settings_config = web_app.settings.get('config', {}).get('LabServerApp', 
{})
+    blacklist_uris = settings_config.get('blacklist_uris', '')
+    whitelist_uris = settings_config.get('whitelist_uris', '')
+
+    if (blacklist_uris) and (whitelist_uris):
+        print('Simultaneous blacklist_uris and whitelist_uris is not 
supported. Please define only one of those.')
+        import sys
+        sys.exit(-1)
+
+    ListingsHandler.listings_refresh_seconds = 
settings_config.get('listings_refresh_seconds', 60 * 60)
+    ListingsHandler.listings_request_opts = 
settings_config.get('listings_request_options', {})
+    listings_url = ujoin(base_url, config.listings_url)
+    listings_path = ujoin(listings_url, '(.*)')
+
+    if blacklist_uris:
+        ListingsHandler.blacklist_uris = set(blacklist_uris.split(','))
+    if whitelist_uris:
+        ListingsHandler.whitelist_uris = set(whitelist_uris.split(','))
+    
+    fetch_listings(None)
+
+    if len(ListingsHandler.blacklist_uris) > 0 or 
len(ListingsHandler.whitelist_uris) > 0:
+        from tornado import ioloop
+        ListingsHandler.pc = ioloop.PeriodicCallback(
+            lambda: fetch_listings(None),
+            callback_time=ListingsHandler.listings_refresh_seconds * 1000,
+            jitter=0.1
+            )
+        ListingsHandler.pc.start()
+
+    handlers.append((listings_path, ListingsHandler, {}))
+
     # Handle local themes.
     if config.themes_dir:
         themes_url = ujoin(base_url, config.themes_url)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jupyterlab_server-1.0.6/jupyterlab_server/listings_handler.py 
new/jupyterlab_server-1.1.5/jupyterlab_server/listings_handler.py
--- old/jupyterlab_server-1.0.6/jupyterlab_server/listings_handler.py   
1970-01-01 01:00:00.000000000 +0100
+++ new/jupyterlab_server-1.1.5/jupyterlab_server/listings_handler.py   
2020-05-23 11:48:35.000000000 +0200
@@ -0,0 +1,82 @@
+"""Tornado handlers for dynamic listings loading."""
+
+# Copyright (c) Jupyter Development Team.
+# Distributed under the terms of the Modified BSD License.
+
+import os
+import time
+import json
+import re
+import tornado
+
+from .server import APIHandler
+
+from traitlets import Instance
+
+
+import requests
+
+
+LISTINGS_URL_SUFFIX='@jupyterlab/extensionmanager-extension/listings.json'
+
+
+def fetch_listings(logger):
+    if not logger:
+        from traitlets import log
+        logger = log.get_logger()
+    if len(ListingsHandler.blacklist_uris) > 0:
+        blacklist = []
+        for blacklist_uri in ListingsHandler.blacklist_uris:
+            logger.info('Fetching blacklist from 
{}'.format(ListingsHandler.blacklist_uris))
+            r = requests.request('GET', blacklist_uri, 
**ListingsHandler.listings_request_opts)
+            j = json.loads(r.text)
+            for b in j['blacklist']:
+                blacklist.append(b)
+            ListingsHandler.blacklist = blacklist
+    if len(ListingsHandler.whitelist_uris) > 0:
+        whitelist = []
+        for whitelist_uri in ListingsHandler.whitelist_uris:
+            logger.info('Fetching whitelist from 
{}'.format(ListingsHandler.whitelist_uris))
+            r = requests.request('GET', whitelist_uri, 
**ListingsHandler.listings_request_opts)
+            j = json.loads(r.text)
+            for w in j['whitelist']:
+                whitelist.append(w)
+        ListingsHandler.whitelist = whitelist
+    ListingsHandler.listings = json.dumps({
+        'blacklist_uris': list(ListingsHandler.blacklist_uris),
+        'whitelist_uris': list(ListingsHandler.whitelist_uris),
+        'blacklist': ListingsHandler.blacklist,
+        'whitelist': ListingsHandler.whitelist,
+    })
+
+
+class ListingsHandler(APIHandler):
+    """An handler that returns the listings specs."""
+
+    """Below fields are class level fields that are accessed and populated
+    by the initialization and the fetch_listings methods.
+    Some fields are initialized before the handler creation in the 
+    handlers.py#add_handlers method.
+    Having those fields predefined reduces the guards in the methods using
+    them.
+    """
+    # The list of blacklist URIS.
+    blacklist_uris = set()
+    # The list of whitelist URIS.
+    whitelist_uris = set()
+    # The blacklisted extensions.
+    blacklist = []
+    # The whitelisted extensions.
+    whitelist = []
+    # The provider request options to be used for the request library.
+    listings_request_opts = {}
+    # The PeriodicCallback that schedule the call to fetch_listings method.
+    pc = None
+
+
+    def get(self, path):
+        self.set_header('Content-Type', 'application/json')
+        if path == LISTINGS_URL_SUFFIX:
+            self.write(ListingsHandler.listings)
+        else:
+            raise tornado.web.HTTPError(400)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyterlab_server-1.0.6/jupyterlab_server/process.py 
new/jupyterlab_server-1.1.5/jupyterlab_server/process.py
--- old/jupyterlab_server-1.0.6/jupyterlab_server/process.py    2019-08-17 
12:37:31.000000000 +0200
+++ new/jupyterlab_server-1.1.5/jupyterlab_server/process.py    2020-05-23 
11:48:39.000000000 +0200
@@ -55,11 +55,11 @@
 
     if not command_with_path:
         if command in ['nodejs', 'node', 'npm']:
-            msg = 'Please install nodejs 5+ and npm before continuing 
installation. nodejs may be installed using conda or directly from the nodejs 
website.'
+            msg = 'Please install Node.js and npm before continuing 
installation. You may be able to install Node.js from your package manager, 
from conda, or directly from the Node.js website (https://nodejs.org).'
             raise ValueError(msg)
         raise ValueError('The command was not found or was not ' +
                 'executable: %s.' % command)
-    return command_with_path
+    return os.path.abspath(command_with_path)
 
 
 class Process(object):
@@ -119,11 +119,20 @@
 
         # Wait for the process to close.
         try:
-            proc.wait()
+            proc.wait(timeout=2.)
+        except subprocess.TimeoutExpired:
+            if os.name == 'nt':
+                sig = signal.SIGBREAK
+            else:
+                sig = signal.SIGKILL
+
+            if proc.poll() is None:
+               os.kill(proc.pid, sig)
+
         finally:
             Process._procs.remove(self)
 
-        return proc.returncode
+        return proc.wait()
 
     def wait(self):
         """Wait for the process to finish.
@@ -230,12 +239,6 @@
             else:
                 os.kill(proc.pid, signal.SIGTERM)
 
-        # Close stdout.
-        try:
-            self._stdout.close()
-        except Exception as e:
-            pass
-
         # Wait for the process to close.
         try:
             proc.wait()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jupyterlab_server-1.0.6/jupyterlab_server.egg-info/PKG-INFO 
new/jupyterlab_server-1.1.5/jupyterlab_server.egg-info/PKG-INFO
--- old/jupyterlab_server-1.0.6/jupyterlab_server.egg-info/PKG-INFO     
2019-08-20 17:52:30.000000000 +0200
+++ new/jupyterlab_server-1.1.5/jupyterlab_server.egg-info/PKG-INFO     
2020-05-23 11:48:53.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: jupyterlab-server
-Version: 1.0.6
+Version: 1.1.5
 Summary: JupyterLab Server
 Home-page: https://jupyter.org
 Author: Jupyter Development Team
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jupyterlab_server-1.0.6/jupyterlab_server.egg-info/SOURCES.txt 
new/jupyterlab_server-1.1.5/jupyterlab_server.egg-info/SOURCES.txt
--- old/jupyterlab_server-1.0.6/jupyterlab_server.egg-info/SOURCES.txt  
2019-08-20 17:52:30.000000000 +0200
+++ new/jupyterlab_server-1.1.5/jupyterlab_server.egg-info/SOURCES.txt  
2020-05-23 11:48:53.000000000 +0200
@@ -8,6 +8,7 @@
 jupyterlab_server/_version.py
 jupyterlab_server/app.py
 jupyterlab_server/handlers.py
+jupyterlab_server/listings_handler.py
 jupyterlab_server/process.py
 jupyterlab_server/process_app.py
 jupyterlab_server/server.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jupyterlab_server-1.0.6/jupyterlab_server.egg-info/requires.txt 
new/jupyterlab_server-1.1.5/jupyterlab_server.egg-info/requires.txt
--- old/jupyterlab_server-1.0.6/jupyterlab_server.egg-info/requires.txt 
2019-08-20 17:52:30.000000000 +0200
+++ new/jupyterlab_server-1.1.5/jupyterlab_server.egg-info/requires.txt 
2020-05-23 11:48:53.000000000 +0200
@@ -1,3 +1,4 @@
+requests
 json5
 jsonschema>=3.0.1
 notebook>=4.2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyterlab_server-1.0.6/setup.py 
new/jupyterlab_server-1.1.5/setup.py
--- old/jupyterlab_server-1.0.6/setup.py        2019-08-20 13:14:51.000000000 
+0200
+++ new/jupyterlab_server-1.1.5/setup.py        2020-05-23 11:48:35.000000000 
+0200
@@ -40,6 +40,7 @@
     setup_args['python_requires'] = '>=3.5'
     setup_args['extras_require'] = {'test': ['pytest', 'requests']}
     setup_args['install_requires'] = [
+        'requests',
         'json5',
         'jsonschema>=3.0.1',
         'notebook>=4.2.0',


Reply via email to