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.
- {txl_kernel-0.1.7 → txl_kernel-0.1.10}/PKG-INFO +1 -1
- txl_kernel-0.1.10/txl_kernel/__init__.py +1 -0
- {txl_kernel-0.1.7 → txl_kernel-0.1.10}/txl_kernel/driver.py +10 -10
- {txl_kernel-0.1.7 → txl_kernel-0.1.10}/txl_kernel/message.py +0 -1
- txl_kernel-0.1.7/txl_kernel/__init__.py +0 -1
- {txl_kernel-0.1.7 → txl_kernel-0.1.10}/.gitignore +0 -0
- {txl_kernel-0.1.7 → txl_kernel-0.1.10}/LICENSE.txt +0 -0
- {txl_kernel-0.1.7 → txl_kernel-0.1.10}/README.md +0 -0
- {txl_kernel-0.1.7 → txl_kernel-0.1.10}/pyproject.toml +0 -0
|
@@ -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
|
|
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(
|
|
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(
|
|
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]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.7"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|