-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message spec consistency #7
Comments
Unfortunately, Javascript is camelcase whereas Python's PEP 8 recommends under_scores:
This was an early decision in the project (when I was the main/only user of this module). This is not the case any longer and I would understand if others would prefer This is the kind of incompatible change you don't want to make when the library is mature. I think that if this naming decision is:
|
While I don't think it's super important, parent_header is actually part of the spec, but the zmq wire-format explodes the top-level dict into frames, relying on the receiver to reconstruct the dict. This makes
In the websocket case, since websockets don't support framing, the whole message is packed up as a single dict, and the receiver doesn't have the opportunity to reconstruct the dict with its own choice of keys. Having the parent key be different in those two contexts could get frustrating for people writing libraries that operate on messages that work in both the browser and node/electron (ahem, @rgbkrk).
|
Just to be clear. I'm reading Having said this, I understand Min's argument that in websocket's case there is no choice but using under_score naming. Honestly, I now think that About how to introduce this incompatible change, given that the library is still so young, I'd rather avoid accumulating cruft. I would suggest (as I did with the last incompatible change) that we:
@willwhitney , since you are also planning to use JMP, what are your thoughts? |
I think we don't need to worry about maintaining 0.1 - as you say, this Breaking changes are fine with me as a user as long as they are versioned Otherwise, sounds good! On Fri, Jul 17, 2015, 3:46 AM Nicolas Riesco notifications@github.com
|
Yup, I'll just update my code to adapt to v0.2.0 as I want to work across the websocket and direct zmq case in the same way. |
For a bit more transparency on use cases, we've been working on some components for inclusion on the web (thebe, the notebook (potentially), adapting some of my current demonstration code, etc.) as well as in Electron and Atom (where we'd use jmp directly). If the messages are consistent, I can work across several frontends with the same javascript. Thanks for the discussion all! 👍 |
Going back and reading Min's comment again, he outlined exactly what I said... so that was me confirming it. 😉 |
OK, I'll publish the change some time today.
|
Thanks! |
In looking at messages from jmp, I noticed that the parent header was camelCase while the spec is under_scores (http://jupyter-client.readthedocs.org/en/latest/messaging.html). This leads to amusing mixes like so:
/cc @minrk
The text was updated successfully, but these errors were encountered: