Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-jupyter-lsp for 
openSUSE:Factory checked in at 2024-03-07 18:30:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jupyter-lsp (Old)
 and      /work/SRC/openSUSE:Factory/.python-jupyter-lsp.new.1770 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-jupyter-lsp"

Thu Mar  7 18:30:55 2024 rev:5 rq:1155897 version:2.2.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-jupyter-lsp/python-jupyter-lsp.changes    
2024-01-19 23:02:20.842360664 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-jupyter-lsp.new.1770/python-jupyter-lsp.changes
  2024-03-07 18:32:24.843650704 +0100
@@ -1,0 +2,9 @@
+Thu Mar  7 12:48:15 UTC 2024 - Ben Greiner <c...@bnavigator.de>
+
+- Update to 2.2.4
+  * fix websocket handler incorrectly inheriting from APIHandler
+    rather than JupyterHandler (#1069)
+  * remove unused notebook config entry point (#1069)
+  * support latest version of typescript-language-server (#1064)
+
+-------------------------------------------------------------------

Old:
----
  jupyter-lsp-2.2.2.tar.gz

New:
----
  jupyter-lsp-2.2.4.tar.gz

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

Other differences:
------------------
++++++ python-jupyter-lsp.spec ++++++
--- /var/tmp/diff_new_pack.LwhmEE/_old  2024-03-07 18:32:25.323668416 +0100
+++ /var/tmp/diff_new_pack.LwhmEE/_new  2024-03-07 18:32:25.323668416 +0100
@@ -16,14 +16,16 @@
 #
 
 
-%define shortversion 2.2.2
+%define shortversion 2.2.4
 Name:           python-jupyter-lsp
-Version:        2.2.2
+Version:        2.2.4
 Release:        0
 Summary:        LSP for Jupyter Notebook/Lab server
 License:        BSD-3-Clause
+# SourceRepository: https://github.com/jupyter-lsp/jupyterlab-lsp
 URL:            
https://github.com/jupyter-lsp/jupyterlab-lsp/tree/main/python_packages/jupyter_lsp
 Source:         
https://files.pythonhosted.org/packages/source/j/jupyter-lsp/jupyter-lsp-%{version}.tar.gz
+BuildRequires:  %{python_module base >= 3.8}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module wheel}
@@ -80,6 +82,5 @@
 %files -n jupyter-lsp
 %doc README.md
 %license LICENSE
-%_jupyter_config %_jupyter_servextension_confdir/jupyter-lsp-notebook.json
 %_jupyter_config %_jupyter_server_confdir/jupyter-lsp-jupyter-server.json
 

++++++ jupyter-lsp-2.2.2.tar.gz -> jupyter-lsp-2.2.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter-lsp-2.2.2/PKG-INFO 
new/jupyter-lsp-2.2.4/PKG-INFO
--- old/jupyter-lsp-2.2.2/PKG-INFO      2024-01-17 23:02:02.036046700 +0100
+++ new/jupyter-lsp-2.2.4/PKG-INFO      2024-03-05 11:59:35.535998300 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: jupyter-lsp
-Version: 2.2.2
+Version: 2.2.4
 Summary: Multi-Language Server WebSocket proxy for Jupyter Notebook/Lab server
 Author: jupyter-lsp Contributors
 Author-email: project.jupy...@gmail.com
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter-lsp-2.2.2/jupyter_lsp/_version.py 
new/jupyter-lsp-2.2.4/jupyter_lsp/_version.py
--- old/jupyter-lsp-2.2.2/jupyter_lsp/_version.py       2024-01-17 
22:58:59.000000000 +0100
+++ new/jupyter-lsp-2.2.4/jupyter_lsp/_version.py       2024-03-05 
11:56:55.000000000 +0100
@@ -1,3 +1,4 @@
 """ single source of truth for jupyter_lsp version
 """
-__version__ = "2.2.2"
+
+__version__ = "2.2.4"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jupyter-lsp-2.2.2/jupyter_lsp/etc/jupyter-lsp-notebook.json 
new/jupyter-lsp-2.2.4/jupyter_lsp/etc/jupyter-lsp-notebook.json
--- old/jupyter-lsp-2.2.2/jupyter_lsp/etc/jupyter-lsp-notebook.json     
2024-01-17 22:58:59.000000000 +0100
+++ new/jupyter-lsp-2.2.4/jupyter_lsp/etc/jupyter-lsp-notebook.json     
1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-{
-  "NotebookApp": {
-    "nbserver_extensions": {
-      "jupyter_lsp": true
-    }
-  }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter-lsp-2.2.2/jupyter_lsp/handlers.py 
new/jupyter-lsp-2.2.4/jupyter_lsp/handlers.py
--- old/jupyter-lsp-2.2.2/jupyter_lsp/handlers.py       2024-01-17 
22:58:59.000000000 +0100
+++ new/jupyter-lsp-2.2.4/jupyter_lsp/handlers.py       2024-03-05 
11:56:55.000000000 +0100
@@ -1,9 +1,10 @@
 """ tornado handler for managing and communicating with language servers
 """
+
 from typing import Optional, Text
 
 from jupyter_core.utils import ensure_async
-from jupyter_server.base.handlers import APIHandler
+from jupyter_server.base.handlers import APIHandler, JupyterHandler
 from jupyter_server.utils import url_path_join as ujoin
 from tornado import web
 from tornado.websocket import WebSocketHandler
@@ -36,8 +37,15 @@
         self.manager = manager
 
 
+class BaseJupyterHandler(JupyterHandler):
+    manager = None  # type: LanguageServerManager
+
+    def initialize(self, manager: LanguageServerManager):
+        self.manager = manager
+
+
 class LanguageServerWebSocketHandler(  # type: ignore
-    WebSocketMixin, WebSocketHandler, BaseHandler
+    WebSocketMixin, WebSocketHandler, BaseJupyterHandler
 ):
     """Setup tornado websocket to route to language server sessions.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter-lsp-2.2.2/jupyter_lsp/manager.py 
new/jupyter-lsp-2.2.4/jupyter_lsp/manager.py
--- old/jupyter-lsp-2.2.2/jupyter_lsp/manager.py        2024-01-17 
22:58:59.000000000 +0100
+++ new/jupyter-lsp-2.2.4/jupyter_lsp/manager.py        2024-03-05 
11:56:55.000000000 +0100
@@ -1,5 +1,6 @@
 """ A configurable frontend for stdio-based Language Servers
 """
+
 import asyncio
 import os
 import sys
@@ -65,12 +66,12 @@
         True, help=_("try to find known language servers in sys.prefix (and 
elsewhere)")
     ).tag(config=True)
 
-    sessions: Dict[
-        Tuple[Text], LanguageServerSession
-    ] = Dict_(  # type:ignore[assignment]
-        trait=Instance(LanguageServerSession),
-        default_value={},
-        help="sessions keyed by language server name",
+    sessions: Dict[Tuple[Text], LanguageServerSession] = (
+        Dict_(  # type:ignore[assignment]
+            trait=Instance(LanguageServerSession),
+            default_value={},
+            help="sessions keyed by language server name",
+        )
     )
 
     virtual_documents_dir = Unicode(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter-lsp-2.2.2/jupyter_lsp/non_blocking.py 
new/jupyter-lsp-2.2.4/jupyter_lsp/non_blocking.py
--- old/jupyter-lsp-2.2.2/jupyter_lsp/non_blocking.py   2024-01-17 
22:58:59.000000000 +0100
+++ new/jupyter-lsp-2.2.4/jupyter_lsp/non_blocking.py   2024-03-05 
11:56:55.000000000 +0100
@@ -5,6 +5,7 @@
 > MIT License  https://github.com/rudolfwalter/pygdbmi/blob/master/LICENSE
 > Copyright (c) 2016 Chad Smith <grassfedcode <at> gmail.com>
 """
+
 import os
 
 if os.name == "nt":  # pragma: no cover
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter-lsp-2.2.2/jupyter_lsp/serverextension.py 
new/jupyter-lsp-2.2.4/jupyter_lsp/serverextension.py
--- old/jupyter-lsp-2.2.2/jupyter_lsp/serverextension.py        2024-01-17 
22:58:59.000000000 +0100
+++ new/jupyter-lsp-2.2.4/jupyter_lsp/serverextension.py        2024-03-05 
11:56:55.000000000 +0100
@@ -1,5 +1,6 @@
 """ add language server support to the running jupyter notebook application
 """
+
 import json
 from pathlib import Path
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter-lsp-2.2.2/jupyter_lsp/session.py 
new/jupyter-lsp-2.2.4/jupyter_lsp/session.py
--- old/jupyter-lsp-2.2.2/jupyter_lsp/session.py        2024-01-17 
22:58:59.000000000 +0100
+++ new/jupyter-lsp-2.2.4/jupyter_lsp/session.py        2024-03-05 
11:56:55.000000000 +0100
@@ -1,5 +1,6 @@
 """ A session for managing a language server process
 """
+
 import asyncio
 import atexit
 import os
@@ -66,12 +67,16 @@
         return dict(
             handler_count=len(self.handlers),
             status=self.status.value,
-            last_server_message_at=self.last_server_message_at.isoformat()
-            if self.last_server_message_at
-            else None,
-            last_handler_message_at=self.last_handler_message_at.isoformat()
-            if self.last_handler_message_at
-            else None,
+            last_server_message_at=(
+                self.last_server_message_at.isoformat()
+                if self.last_server_message_at
+                else None
+            ),
+            last_handler_message_at=(
+                self.last_handler_message_at.isoformat()
+                if self.last_handler_message_at
+                else None
+            ),
             spec=censored_spec(self.spec),
         )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter-lsp-2.2.2/jupyter_lsp/specs/__init__.py 
new/jupyter-lsp-2.2.4/jupyter_lsp/specs/__init__.py
--- old/jupyter-lsp-2.2.2/jupyter_lsp/specs/__init__.py 2024-01-17 
22:58:59.000000000 +0100
+++ new/jupyter-lsp-2.2.4/jupyter_lsp/specs/__init__.py 2024-03-05 
11:56:55.000000000 +0100
@@ -1,5 +1,6 @@
 """ default specs
 """
+
 # flake8: noqa: F401
 
 from .bash_language_server import BashLanguageServer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jupyter-lsp-2.2.2/jupyter_lsp/specs/config/pyright.schema.json 
new/jupyter-lsp-2.2.4/jupyter_lsp/specs/config/pyright.schema.json
--- old/jupyter-lsp-2.2.2/jupyter_lsp/specs/config/pyright.schema.json  
2024-01-17 22:58:59.000000000 +0100
+++ new/jupyter-lsp-2.2.4/jupyter_lsp/specs/config/pyright.schema.json  
2024-03-05 11:56:55.000000000 +0100
@@ -78,6 +78,12 @@
           "default": "warning",
           "enum": ["none", "information", "warning", "error"]
         },
+        "reportInvalidTypeForm": {
+          "type": "string",
+          "description": "Diagnostics for type expression that uses an invalid 
form.",
+          "default": "error",
+          "enum": ["none", "information", "warning", "error"]
+        },
         "reportMissingTypeStubs": {
           "type": "string",
           "description": "Diagnostics for imports that have no corresponding 
type stub file (either a typeshed file or a custom type stub). The type checker 
requires type stubs to do its best job at analysis.",
@@ -126,6 +132,72 @@
           "default": "warning",
           "enum": ["none", "information", "warning", "error"]
         },
+        "reportAbstractUsage": {
+          "type": "string",
+          "description": "Diagnostics for an attempt to instantiate an 
abstract or protocol class or use an abstract method.",
+          "default": "error",
+          "enum": ["none", "information", "warning", "error"]
+        },
+        "reportArgumentType": {
+          "type": "string",
+          "description": "Diagnostics for a type incompatibility for an 
argument to a call.",
+          "default": "error",
+          "enum": ["none", "information", "warning", "error"]
+        },
+        "reportAssertTypeFailure": {
+          "type": "string",
+          "description": "Diagnostics for a type incompatibility detected by a 
typing.assert_type call.",
+          "default": "error",
+          "enum": ["none", "information", "warning", "error"]
+        },
+        "reportAssignmentType": {
+          "type": "string",
+          "description": "Diagnostics for type incompatibilities for 
assignments.",
+          "default": "error",
+          "enum": ["none", "information", "warning", "error"]
+        },
+        "reportAttributeAccessIssue": {
+          "type": "string",
+          "description": "Diagnostics for issues involving attribute 
accesses.",
+          "default": "error",
+          "enum": ["none", "information", "warning", "error"]
+        },
+        "reportCallIssue": {
+          "type": "string",
+          "description": "Diagnostics for issues involving call expressions 
and arguments.",
+          "default": "error",
+          "enum": ["none", "information", "warning", "error"]
+        },
+        "reportInconsistentOverload": {
+          "type": "string",
+          "description": "Diagnostics for inconsistencies between function 
overload signatures and implementation.",
+          "default": "error",
+          "enum": ["none", "information", "warning", "error"]
+        },
+        "reportIndexIssue": {
+          "type": "string",
+          "description": "Diagnostics related to index operations and 
expressions.",
+          "default": "error",
+          "enum": ["none", "information", "warning", "error"]
+        },
+        "reportInvalidTypeArguments": {
+          "type": "string",
+          "description": "Diagnostics for invalid type argument usage.",
+          "default": "error",
+          "enum": ["none", "information", "warning", "error"]
+        },
+        "reportNoOverloadImplementation": {
+          "type": "string",
+          "description": "Diagnostics for an overloaded function or method 
with a missing implementation.",
+          "default": "error",
+          "enum": ["none", "information", "warning", "error"]
+        },
+        "reportOperatorIssue": {
+          "type": "string",
+          "description": "Diagnostics for related to unary or binary 
operators.",
+          "default": "error",
+          "enum": ["none", "information", "warning", "error"]
+        },
         "reportOptionalSubscript": {
           "type": "string",
           "description": "Diagnostics for an attempt to subscript (index) a 
variable with an Optional type.",
@@ -162,6 +234,18 @@
           "default": "error",
           "enum": ["none", "information", "warning", "error"]
         },
+        "reportRedeclaration": {
+          "type": "string",
+          "description": "Diagnostics for an attempt to declare the type of a 
symbol multiple times.",
+          "default": "error",
+          "enum": ["none", "information", "warning", "error"]
+        },
+        "reportReturnType": {
+          "type": "string",
+          "description": "Diagnostics related to function return type 
compatibility.",
+          "default": "error",
+          "enum": ["none", "information", "warning", "error"]
+        },
         "reportTypedDictNotRequiredAccess": {
           "type": "string",
           "description": "Diagnostics for an attempt to access a non-required 
key within a TypedDict without a check for its presence.",
@@ -246,6 +330,12 @@
           "default": "none",
           "enum": ["none", "information", "warning", "error"]
         },
+        "reportPossiblyUnboundVariable": {
+          "type": "string",
+          "description": "Diagnostics for the use of variables that may be 
unbound on some code paths.",
+          "default": "error",
+          "enum": ["none", "information", "warning", "error"]
+        },
         "reportMissingSuperCall": {
           "type": "string",
           "description": "Diagnostics for missing call to parent class for 
inherited `__init__` methods.",
@@ -402,6 +492,12 @@
           "default": "error",
           "enum": ["none", "information", "warning", "error"]
         },
+        "reportUnusedExcept": {
+          "type": "string",
+          "description": "Diagnostics for unreachable except clause.",
+          "default": "error",
+          "enum": ["none", "information", "warning", "error"]
+        },
         "reportUnusedExpression": {
           "type": "string",
           "description": "Diagnostics for simple expressions whose value is 
not used in any way.",
@@ -468,6 +564,12 @@
       "description": "Disables type completion, definitions, and references.",
       "scope": "resource"
     },
+    "pyright.disableTaggedHints": {
+      "type": "boolean",
+      "default": false,
+      "description": "Disable hint diagnostics with special hints for 
grayed-out or strike-through text.",
+      "scope": "resource"
+    },
     "pyright.disableOrganizeImports": {
       "type": "boolean",
       "default": false,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jupyter-lsp-2.2.2/jupyter_lsp/specs/typescript_language_server.py 
new/jupyter-lsp-2.2.4/jupyter_lsp/specs/typescript_language_server.py
--- old/jupyter-lsp-2.2.2/jupyter_lsp/specs/typescript_language_server.py       
2024-01-17 22:58:59.000000000 +0100
+++ new/jupyter-lsp-2.2.4/jupyter_lsp/specs/typescript_language_server.py       
2024-03-05 11:56:55.000000000 +0100
@@ -4,7 +4,7 @@
 
 class TypescriptLanguageServer(NodeModuleSpec):
     node_module = key = "typescript-language-server"
-    script = ["lib", "cli.js"]
+    script = ["lib", "cli.mjs"]
     args = ["--stdio"]
     languages = [
         "javascript",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter-lsp-2.2.2/jupyter_lsp/stdio.py 
new/jupyter-lsp-2.2.4/jupyter_lsp/stdio.py
--- old/jupyter-lsp-2.2.2/jupyter_lsp/stdio.py  2024-01-17 22:58:59.000000000 
+0100
+++ new/jupyter-lsp-2.2.4/jupyter_lsp/stdio.py  2024-03-05 11:56:55.000000000 
+0100
@@ -7,6 +7,7 @@
 > > MIT License   
 > > https://github.com/palantir/python-jsonrpc-server/blob/0.2.0/LICENSE
 > > Copyright 2018 Palantir Technologies, Inc.
 """
+
 # pylint: disable=broad-except
 import asyncio
 import io
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter-lsp-2.2.2/jupyter_lsp/tests/conftest.py 
new/jupyter-lsp-2.2.4/jupyter_lsp/tests/conftest.py
--- old/jupyter-lsp-2.2.2/jupyter_lsp/tests/conftest.py 2024-01-17 
22:58:59.000000000 +0100
+++ new/jupyter-lsp-2.2.4/jupyter_lsp/tests/conftest.py 2024-03-05 
11:56:55.000000000 +0100
@@ -1,6 +1,8 @@
 import json
+import os
 import pathlib
 import shutil
+from pathlib import Path
 from typing import Text
 
 from jupyter_server.serverapp import ServerApp
@@ -43,9 +45,14 @@
 KNOWN_UNKNOWN_SERVERS = ["foo-language-server"]
 
 
+def extra_node_roots():
+    root = Path(os.environ.get("JLSP_TEST_ROOT") or Path.cwd())
+    return dict(extra_node_roots=[str(root)] if root else [])
+
+
 @fixture
 def manager() -> LanguageServerManager:
-    return LanguageServerManager()
+    return LanguageServerManager(**extra_node_roots())
 
 
 @fixture
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter-lsp-2.2.2/jupyter_lsp/tests/test_auth.py 
new/jupyter-lsp-2.2.4/jupyter_lsp/tests/test_auth.py
--- old/jupyter-lsp-2.2.2/jupyter_lsp/tests/test_auth.py        2024-01-17 
22:58:59.000000000 +0100
+++ new/jupyter-lsp-2.2.4/jupyter_lsp/tests/test_auth.py        2024-03-05 
11:56:55.000000000 +0100
@@ -1,21 +1,26 @@
 """Integration tests of authorization running under jupyter-server."""
+
 import json
 import os
 import socket
 import subprocess
+import sys
 import time
 import uuid
-from typing import Generator, Tuple
+from typing import Generator, Optional, Tuple
 from urllib.error import HTTPError, URLError
 from urllib.request import urlopen
 
 import pytest
 
-from .conftest import KNOWN_SERVERS
+from .conftest import KNOWN_SERVERS, extra_node_roots
 
 LOCALHOST = "127.0.0.1"
 REST_ROUTES = ["/lsp/status"]
 WS_ROUTES = [f"/lsp/ws/{ls}" for ls in KNOWN_SERVERS]
+SUBPROCESS_PREFIX = json.loads(
+    os.environ.get("JLSP_TEST_SUBPROCESS_PREFIX", f"""["{sys.executable}", 
"-m"]""")
+)
 
 
 @pytest.mark.parametrize("route", REST_ROUTES)
@@ -25,18 +30,17 @@
 
     verify_response(base_url, route)
 
-    url = f"{base_url}{route}"
+    raw_body = verify_response(base_url, f"{route}?token={token}", 200)
 
-    with urlopen(f"{url}?token={token}") as response:
-        raw_body = response.read().decode("utf-8")
+    assert raw_body is not None, f"no response received from {route}"
 
     decode_error = None
 
     try:
-        json.loads(raw_body)
-    except json.decoder.JSONDecodeError as err:
+        json.loads(raw_body.decode("utf-8"))
+    except json.decoder.JSONDecodeError as err:  # pragma: no cover
         decode_error = err
-    assert not decode_error, f"the response for {url} was not JSON"
+    assert not decode_error, f"the response for {route} was not JSON: 
{decode_error}"
 
 
 @pytest.mark.parametrize("route", WS_ROUTES)
@@ -60,10 +64,16 @@
     server_conf.parent.mkdir(parents=True)
     extensions = {"jupyter_lsp": True, "jupyterlab": False, "nbclassic": False}
     app = {"jpserver_extensions": extensions, "token": token}
-    config_data = {"ServerApp": app, "IdentityProvider": {"token": token}}
+    lsm = {**extra_node_roots()}
+    config_data = {
+        "ServerApp": app,
+        "IdentityProvider": {"token": token},
+        "LanguageServerManager": lsm,
+    }
 
     server_conf.write_text(json.dumps(config_data), encoding="utf-8")
-    args = ["jupyter-server", f"--port={port}", "--no-browser"]
+    args = [*SUBPROCESS_PREFIX, "jupyter_server", f"--port={port}", 
"--no-browser"]
+    print("server args", args)
     env = dict(os.environ)
     env.update(
         HOME=str(home),
@@ -73,18 +83,26 @@
     proc = subprocess.Popen(args, cwd=str(root_dir), env=env, 
stdin=subprocess.PIPE)
     url = f"http://{LOCALHOST}:{port}";
     retries = 20
-    while retries:
-        time.sleep(1)
+    ok = False
+    while not ok and retries:
         try:
-            urlopen(f"{url}/favicon.ico")
-            break
+            ok = urlopen(f"{url}/favicon.ico")
         except URLError:
             print(f"[{retries} / 20] ...", flush=True)
             retries -= 1
-            continue
+            time.sleep(1)
+    if not ok:  # pragma: no cover
+        raise RuntimeError("the server did not start")
     yield url, token
-    proc.terminate()
-    proc.communicate(b"y\n")
+    try:
+        print("shutting down with API...")
+        urlopen(f"{url}/api/shutdown?token={token}", data=[])
+    except URLError:  # pragma: no cover
+        print("shutting down the hard way...")
+        proc.terminate()
+        proc.communicate(b"y\n")
+        proc.wait()
+        proc.kill()
     proc.wait()
     assert proc.returncode is not None, "jupyter-server probably still running"
 
@@ -102,16 +120,18 @@
     return port
 
 
-def verify_response(base_url: str, route: str, expect: int = 403):
+def verify_response(
+    base_url: str, route: str, expect_code: int = 403
+) -> Optional[bytes]:
     """Verify that a response returns the expected error."""
-    error = None
     body = None
+    code = None
     url = f"{base_url}{route}"
     try:
-        with urlopen(url) as res:
-            body = res.read()
+        res = urlopen(url)
+        code = res.getcode()
+        body = res.read()
     except HTTPError as err:
-        error = err
-    assert error, f"no HTTP error for {url}: {body}"
-    http_code = error.getcode()
-    assert http_code == expect, f"{url} HTTP code was unexpected: {body}"
+        code = err.getcode()
+    assert code == expect_code, f"HTTP {code} (not expected {expect_code}) for 
{url}"
+    return body
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter-lsp-2.2.2/jupyter_lsp/types.py 
new/jupyter-lsp-2.2.4/jupyter_lsp/types.py
--- old/jupyter-lsp-2.2.2/jupyter_lsp/types.py  2024-01-17 22:58:59.000000000 
+0100
+++ new/jupyter-lsp-2.2.4/jupyter_lsp/types.py  2024-03-05 11:56:55.000000000 
+0100
@@ -1,5 +1,6 @@
 """ API used by spec finders and manager
 """
+
 import asyncio
 import enum
 import json
@@ -48,8 +49,7 @@
             message: LanguageServerMessage,
             language_server: Text,
             manager: "LanguageServerManagerAPI",
-        ) -> Awaitable[None]:
-            ...
+        ) -> Awaitable[None]: ...
 
 
 class SessionStatus(enum.Enum):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter-lsp-2.2.2/jupyter_lsp.egg-info/PKG-INFO 
new/jupyter-lsp-2.2.4/jupyter_lsp.egg-info/PKG-INFO
--- old/jupyter-lsp-2.2.2/jupyter_lsp.egg-info/PKG-INFO 2024-01-17 
23:02:01.000000000 +0100
+++ new/jupyter-lsp-2.2.4/jupyter_lsp.egg-info/PKG-INFO 2024-03-05 
11:59:35.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: jupyter-lsp
-Version: 2.2.2
+Version: 2.2.4
 Summary: Multi-Language Server WebSocket proxy for Jupyter Notebook/Lab server
 Author: jupyter-lsp Contributors
 Author-email: project.jupy...@gmail.com
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter-lsp-2.2.2/jupyter_lsp.egg-info/SOURCES.txt 
new/jupyter-lsp-2.2.4/jupyter_lsp.egg-info/SOURCES.txt
--- old/jupyter-lsp-2.2.2/jupyter_lsp.egg-info/SOURCES.txt      2024-01-17 
23:02:02.000000000 +0100
+++ new/jupyter-lsp-2.2.4/jupyter_lsp.egg-info/SOURCES.txt      2024-03-05 
11:59:35.000000000 +0100
@@ -25,7 +25,6 @@
 jupyter_lsp.egg-info/requires.txt
 jupyter_lsp.egg-info/top_level.txt
 jupyter_lsp/etc/jupyter-lsp-jupyter-server.json
-jupyter_lsp/etc/jupyter-lsp-notebook.json
 jupyter_lsp/schema/__init__.py
 jupyter_lsp/schema/schema.json
 jupyter_lsp/specs/__init__.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter-lsp-2.2.2/setup.cfg 
new/jupyter-lsp-2.2.4/setup.cfg
--- old/jupyter-lsp-2.2.2/setup.cfg     2024-01-17 23:02:02.036046700 +0100
+++ new/jupyter-lsp-2.2.4/setup.cfg     2024-03-05 11:59:35.535998300 +0100
@@ -1,5 +1,6 @@
 [metadata]
 name = jupyter-lsp
+version = attr: jupyter_lsp._version.__version__
 description = Multi-Language Server WebSocket proxy for Jupyter Notebook/Lab 
server
 long_description = file: ./README.md
 long_description_content_type = text/markdown
@@ -31,6 +32,9 @@
        jupyter_server >=1.1.2
        importlib_metadata >=4.8.3 ; python_version<"3.10"
 
+[options.data_files]
+etc/jupyter/jupyter_server_config.d = 
jupyter_lsp/etc/jupyter-lsp-jupyter-server.json
+
 [options.entry_points]
 jupyter_lsp_spec_v1 = 
        bash-language-server = jupyter_lsp.specs:bash
@@ -51,15 +55,6 @@
        vscode-json-languageserver-bin = jupyter_lsp.specs:json
        yaml-language-server = jupyter_lsp.specs:yaml
 
-[tool:pytest]
-junit_family = xunit2
-addopts = 
-       --pyargs jupyter_lsp
-       --cov jupyter_lsp
-       --cov-report term-missing:skip-covered
-       -p no:warnings
-       --flake8
-
 [egg_info]
 tag_build = 
 tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyter-lsp-2.2.2/setup.py 
new/jupyter-lsp-2.2.4/setup.py
--- old/jupyter-lsp-2.2.2/setup.py      2024-01-17 22:58:59.000000000 +0100
+++ new/jupyter-lsp-2.2.4/setup.py      2024-03-05 11:56:55.000000000 +0100
@@ -1,26 +1 @@
-import re
-import sys
-from pathlib import Path
-
-import setuptools
-
-setuptools.setup(
-    name="jupyter-lsp",
-    version=re.findall(
-        r"""__version__ = "([^"]+)"$""",
-        (Path(__file__).parent / "jupyter_lsp" / "_version.py").read_text(
-            encoding="utf-8"
-        ),
-    )[0],
-    setup_requires=["pytest-runner"] if "test" in sys.argv else [],
-    data_files=[
-        (
-            "etc/jupyter/jupyter_server_config.d",
-            ["jupyter_lsp/etc/jupyter-lsp-jupyter-server.json"],
-        ),
-        (
-            "etc/jupyter/jupyter_notebook_config.d",
-            ["jupyter_lsp/etc/jupyter-lsp-notebook.json"],
-        ),
-    ],
-)
+__import__("setuptools").setup()

Reply via email to