txl_kernel 0.1.7__tar.gz → 0.1.10__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_kernel
3
- Version: 0.1.7
3
+ Version: 0.1.10
4
4
  Summary: TXL plugin for a kernel driver
5
5
  Project-URL: Source, https://github.com/davidbrochart/jpterm/plugins/kernel
6
6
  Author-email: David Brochart <david.brochart@gmail.com>
@@ -0,0 +1 @@
1
+ __version__ = "0.1.10"
@@ -4,7 +4,7 @@ from typing import Dict, List
4
4
 
5
5
  import y_py as Y
6
6
 
7
- from .message import create_message, str_to_date
7
+ from .message import create_message
8
8
 
9
9
 
10
10
  def deadline_to_timeout(deadline: float) -> float:
@@ -12,7 +12,6 @@ def deadline_to_timeout(deadline: float) -> float:
12
12
 
13
13
 
14
14
  class Comm:
15
-
16
15
  def __init__(self, comm_id: str, shell_channel, session_id: str, send_message):
17
16
  self.comm_id = comm_id
18
17
  self.shell_channel = shell_channel
@@ -29,11 +28,12 @@ class Comm:
29
28
  buffers=buffers,
30
29
  )
31
30
  self.msg_cnt += 1
32
- asyncio.create_task(self.send_message(msg, self.shell_channel, change_date_to_str=True))
31
+ asyncio.create_task(
32
+ self.send_message(msg, self.shell_channel, change_date_to_str=True)
33
+ )
33
34
 
34
35
 
35
36
  class KernelMixin:
36
-
37
37
  def __init__(self):
38
38
  self.msg_cnt = 0
39
39
  self.execute_requests: Dict[str, Dict[str, List[asyncio.Future]]] = {}
@@ -54,9 +54,7 @@ class KernelMixin:
54
54
  msg_id=str(self.msg_cnt),
55
55
  )
56
56
  self.msg_cnt += 1
57
- await self.send_message(
58
- msg, self.shell_channel, change_date_to_str=True
59
- )
57
+ await self.send_message(msg, self.shell_channel, change_date_to_str=True)
60
58
  msg_id = msg["header"]["msg_id"]
61
59
  self.execute_requests[msg_id] = {
62
60
  "iopub": [asyncio.Future()],
@@ -90,15 +88,17 @@ class KernelMixin:
90
88
  if msg_type == "comm_open":
91
89
  for comm_handler in self.comm_handlers:
92
90
  comm_id = msg["content"]["comm_id"]
93
- comm = Comm(comm_id, self.shell_channel, self.session_id, self.send_message)
91
+ comm = Comm(
92
+ comm_id, self.shell_channel, self.session_id, self.send_message
93
+ )
94
94
  comm_handler.comm_open(msg, comm)
95
95
  elif msg_type == "comm_msg":
96
96
  for comm_handler in self.comm_handlers:
97
97
  comm_handler.comm_msg(msg)
98
98
  msg_id = msg["parent_header"].get("msg_id")
99
99
  if msg_id in self.execute_requests:
100
- #msg["header"] = str_to_date(msg["header"])
101
- #msg["parent_header"] = str_to_date(msg["parent_header"])
100
+ # msg["header"] = str_to_date(msg["header"])
101
+ # msg["parent_header"] = str_to_date(msg["parent_header"])
102
102
  future_msgs = self.execute_requests[msg_id][channel]
103
103
  if future_msgs:
104
104
  fut = future_msgs[-1]
@@ -4,7 +4,6 @@ from uuid import uuid4
4
4
 
5
5
  from dateutil.parser import parse as dateutil_parse
6
6
 
7
-
8
7
  PROTOCOL_VERSION = "5.3"
9
8
 
10
9
 
@@ -1 +0,0 @@
1
- __version__ = "0.1.7"
File without changes
File without changes
File without changes
File without changes