-
-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f1c67e
commit 9363910
Showing
18 changed files
with
301 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from jupyter_client.session import Session as _Session | ||
|
||
|
||
class Session(_Session): | ||
async def recv(self, socket, copy=True): | ||
return await socket.recv_multipart() | ||
|
||
def send( | ||
self, | ||
socket, | ||
msg_or_type, | ||
content=None, | ||
parent=None, | ||
ident=None, | ||
buffers=None, | ||
track=False, | ||
header=None, | ||
metadata=None, | ||
): | ||
if isinstance(msg_or_type, str): | ||
msg = self.msg( | ||
msg_or_type, | ||
content=content, | ||
parent=parent, | ||
header=header, | ||
metadata=metadata, | ||
) | ||
else: | ||
# We got a Message or message dict, not a msg_type so don't | ||
# build a new Message. | ||
msg = msg_or_type | ||
buffers = buffers or msg.get("buffers", []) | ||
|
||
socket.send_multipart(msg) | ||
return msg | ||
|
||
def feed_identities(self, msg, copy=True): | ||
return "", msg | ||
|
||
def deserialize(self, msg, content=True, copy=True): | ||
return msg |
Oops, something went wrong.