txl-remote-kernels 0.1.19__tar.gz → 0.1.21__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: txl_remote_kernels
3
- Version: 0.1.19
3
+ Version: 0.1.21
4
4
  Summary: TXL plugin for remote kernels
5
5
  Project-URL: Source, https://github.com/davidbrochart/jpterm/plugins/remote_kernels
6
6
  Author-email: David Brochart <david.brochart@gmail.com>
@@ -0,0 +1 @@
1
+ __version__ = "0.1.21"
@@ -11,7 +11,6 @@ from .driver import KernelDriver
11
11
 
12
12
 
13
13
  class RemoteKernels(Kernels):
14
-
15
14
  comm_handlers = []
16
15
 
17
16
  def __init__(
@@ -36,9 +36,7 @@ class KernelDriver(KernelMixin):
36
36
  self.query_params = parse.parse_qs(parsed_url.query)
37
37
  self.cookies = httpx.Cookies()
38
38
  i = self.base_url.find(":")
39
- self.ws_url = ("wss" if self.base_url[i - 1] == "s" else "ws") + self.base_url[
40
- i:
41
- ]
39
+ self.ws_url = ("wss" if self.base_url[i - 1] == "s" else "ws") + self.base_url[i:]
42
40
  self.start_task = asyncio.create_task(self.start())
43
41
  self.comm_handlers = comm_handlers
44
42
  self.shell_channel = "shell"
@@ -6,13 +6,10 @@ from typing import Any, Dict, List, Optional
6
6
  def deserialize_msg_from_ws_v1(ws_msg: bytes) -> Dict[str, Any]:
7
7
  offset_number = int.from_bytes(ws_msg[:8], "little")
8
8
  offsets = [
9
- int.from_bytes(ws_msg[8 * (i + 1) : 8 * (i + 2)], "little")
10
- for i in range(offset_number)
9
+ int.from_bytes(ws_msg[8 * (i + 1) : 8 * (i + 2)], "little") for i in range(offset_number)
11
10
  ]
12
11
  channel = ws_msg[offsets[0] : offsets[1]].decode("utf-8")
13
- msg_list = [
14
- ws_msg[offsets[i] : offsets[i + 1]] for i in range(1, offset_number - 1)
15
- ]
12
+ msg_list = [ws_msg[offsets[i] : offsets[i + 1]] for i in range(1, offset_number - 1)]
16
13
  msg = {
17
14
  "channel": channel,
18
15
  "header": json.loads(msg_list[0]),
@@ -1 +0,0 @@
1
- __version__ = "0.1.19"