Add adapter for msg spec versions#5752
Conversation
|
the real diff for this PR. |
|
With the |
|
The base |
|
|
|
Min's mental note: Update display_json mechanisms - kernel and possibly JS |
|
In V4toV5, you set |
|
On line 196, I think you could use |
|
There's a TODO in v4 to v5 complete_reply, but it's not clear to me what the current code will result in at the UI level. |
|
Completed one review pass, only minor comments. |
Comment added.
Probably doesn't belong in the base class. It's just because that hasn't changed between 4 and 5. I'll move it to another method that subclasses can override, in case we do change it.
copy/paste error, fixed.
Yes, probably.
That's actually why I wrote it, but then realized I don't need it and only would call it in one place, so I removed it.
Makes sense, changed to '5.0'.
As discussed and demonstrated in person, this is changed to:
which gets special handling in the frontend. |
for adapting msg spec versions
adds Session.adapt_version for target version. - serialize adapts to Session.adapt_version (default: 0, no adaptation) - unserialize always adapts to current active version
- docs and comments - adapt complete_reply with `end=null`, `start=-len(matched_text)` - remove some incorrect `status` fields - add `handle_reply_status_error` for handling `status=error` replies (no-op, currently)
|
Rebased on master, now that #5436 is merged. |
Add adapter for msg spec versions
Add adapter for msg spec versions
in IPython.kernel.adapter
Based on PR #4536
Basic changes:
adapt(msg)function.With this PR, at least the Julia and R kernels work in all three zmq-based frontends, without updating to the v5 msg spec.