conkernelclient 0.0.5__tar.gz → 0.0.6__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.
- {conkernelclient-0.0.5/conkernelclient.egg-info → conkernelclient-0.0.6}/PKG-INFO +1 -1
- conkernelclient-0.0.6/conkernelclient/__init__.py +2 -0
- {conkernelclient-0.0.5 → conkernelclient-0.0.6}/conkernelclient/_modidx.py +2 -0
- {conkernelclient-0.0.5 → conkernelclient-0.0.6}/conkernelclient/core.py +8 -0
- {conkernelclient-0.0.5 → conkernelclient-0.0.6/conkernelclient.egg-info}/PKG-INFO +1 -1
- conkernelclient-0.0.5/conkernelclient/__init__.py +0 -2
- {conkernelclient-0.0.5 → conkernelclient-0.0.6}/LICENSE +0 -0
- {conkernelclient-0.0.5 → conkernelclient-0.0.6}/MANIFEST.in +0 -0
- {conkernelclient-0.0.5 → conkernelclient-0.0.6}/README.md +0 -0
- {conkernelclient-0.0.5 → conkernelclient-0.0.6}/conkernelclient.egg-info/SOURCES.txt +0 -0
- {conkernelclient-0.0.5 → conkernelclient-0.0.6}/conkernelclient.egg-info/dependency_links.txt +0 -0
- {conkernelclient-0.0.5 → conkernelclient-0.0.6}/conkernelclient.egg-info/entry_points.txt +0 -0
- {conkernelclient-0.0.5 → conkernelclient-0.0.6}/conkernelclient.egg-info/requires.txt +0 -0
- {conkernelclient-0.0.5 → conkernelclient-0.0.6}/conkernelclient.egg-info/top_level.txt +0 -0
- {conkernelclient-0.0.5 → conkernelclient-0.0.6}/pyproject.toml +0 -0
- {conkernelclient-0.0.5 → conkernelclient-0.0.6}/setup.cfg +0 -0
|
@@ -12,6 +12,8 @@ d = { 'settings': { 'branch': 'main',
|
|
|
12
12
|
'conkernelclient/core.py'),
|
|
13
13
|
'conkernelclient.core.ConKernelClient.start_channels': ( 'core.html#conkernelclient.start_channels',
|
|
14
14
|
'conkernelclient/core.py'),
|
|
15
|
+
'conkernelclient.core.ConKernelClient.stdin_send': ( 'core.html#conkernelclient.stdin_send',
|
|
16
|
+
'conkernelclient/core.py'),
|
|
15
17
|
'conkernelclient.core.ConKernelClient.stop_channels': ( 'core.html#conkernelclient.stop_channels',
|
|
16
18
|
'conkernelclient/core.py'),
|
|
17
19
|
'conkernelclient.core.ConKernelManager': ('core.html#conkernelmanager', 'conkernelclient/core.py'),
|
|
@@ -37,6 +37,7 @@ Session.send = _send
|
|
|
37
37
|
# %% ../nbs/00_core.ipynb #d6a5fa6a
|
|
38
38
|
class ConKernelClient(AsyncKernelClient):
|
|
39
39
|
async def start_channels(self, shell:bool=True, iopub:bool=True, stdin:bool=True, hb:bool=True, control:bool=True):
|
|
40
|
+
"Start channels, wait for ready, and launch background shell-reply reader"
|
|
40
41
|
super().start_channels(shell=shell, iopub=iopub, stdin=stdin, hb=hb, control=control)
|
|
41
42
|
await self.wait_for_ready()
|
|
42
43
|
self._pending = {}
|
|
@@ -58,6 +59,7 @@ class ConKernelClient(AsyncKernelClient):
|
|
|
58
59
|
return self
|
|
59
60
|
|
|
60
61
|
def stop_channels(self):
|
|
62
|
+
"Stop channels and cancel the background shell-reply reader task"
|
|
61
63
|
super().stop_channels()
|
|
62
64
|
if (tk := getattr(self, '_shell_reader_task', None)):
|
|
63
65
|
tk.cancel()
|
|
@@ -76,6 +78,7 @@ class ConKernelClient(AsyncKernelClient):
|
|
|
76
78
|
|
|
77
79
|
def execute(self, code, user_expressions=None, allow_stdin=None, reply=False, subsh_id=None,
|
|
78
80
|
cts_typ='code', timeout=60, msg_id=None, **kw):
|
|
81
|
+
"Send an execute request, returning a coroutine for the reply if `reply`, else the msg_id"
|
|
79
82
|
if user_expressions is None: user_expressions = {}
|
|
80
83
|
if allow_stdin is None: allow_stdin = self.allow_stdin
|
|
81
84
|
content = dict(user_expressions=user_expressions, allow_stdin=allow_stdin, subsh_id=subsh_id, **kw)
|
|
@@ -89,5 +92,10 @@ class ConKernelClient(AsyncKernelClient):
|
|
|
89
92
|
if not reply: return msg_id
|
|
90
93
|
return self._async_recv_reply(msg_id, timeout=timeout)
|
|
91
94
|
|
|
95
|
+
async def stdin_send(self, msg:dict):
|
|
96
|
+
"Send on `stdin_channel` then ping event loop"
|
|
97
|
+
self.stdin_channel.send(msg)
|
|
98
|
+
await asyncio.sleep(0)
|
|
99
|
+
|
|
92
100
|
# %% ../nbs/00_core.ipynb #b828c222
|
|
93
101
|
class ConKernelManager(AsyncKernelManager): client_class,client_factory = ConKernelClient,Type(ConKernelClient)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{conkernelclient-0.0.5 → conkernelclient-0.0.6}/conkernelclient.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|