Skip to content

Commit

Permalink
Merge pull request #1069 from krassowski/fix-websocket-and-spurious-n…
Browse files Browse the repository at this point in the history
…otebook-json

Fix websocket handler and remove spurious config for old notebook server
  • Loading branch information
krassowski authored Mar 5, 2024
2 parents b3562f9 + e8e5461 commit 71c8e0c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## Changelog

### `jupyter-lsp 2.2.4`

- bug fixes:
- 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)

### `@jupyter-lsp/jupyterlab-lsp 5.1.0`

Requires JupyterLab `>=4.1.0,<5.0.0a0`
Expand Down
2 changes: 1 addition & 1 deletion python_packages/jupyter_lsp/jupyter_lsp/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" single source of truth for jupyter_lsp version
"""

__version__ = "2.2.3"
__version__ = "2.2.4"

This file was deleted.

11 changes: 9 additions & 2 deletions python_packages/jupyter_lsp/jupyter_lsp/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
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
Expand Down Expand Up @@ -37,8 +37,15 @@ def initialize(self, manager: LanguageServerManager):
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.
Expand Down

0 comments on commit 71c8e0c

Please sign in to comment.