-
Notifications
You must be signed in to change notification settings - Fork 123
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
Schema loading from the wire #307
Conversation
@haata are you happy with the features this enables and the interface? I'm going to try get this to pass this week.
Another MR to expose |
Yeah, I think once you finish your todo list it will look good. Make sure to rebase, I fixed some linting errors recently. |
77565ee
to
7d40bbe
Compare
Could I ask that we tag this as a minor release so that we can utilise it in our project? I have been trying to distribute the builds using cibuildwheels on my local windows machine with NO success. I guess we could use builds from our fork though. |
CI seems to be failing on an unrelated test for SSL, but on our github fork we've managed to get this to pass |
I merged one of the incoming large changes (one that should help a lot with SSL). Unfortunately you'll need to rebase your changes. |
3ec32ba
to
68b5a44
Compare
Cap'n Proto provides a schema loader, which can be used to dynamically load schemas during runtime. To port this functionality to pycapnp, a new class is provided `C_SchemaLoader`, which exposes the Cap'n Proto C++ interface, and `SchemaLoader`, which is part of the pycapnp library. The specific use case for this is when a capnp message contains a Node.Reader: The schema for a yet unseen message can be loaded dynamically, allowing the future message to be properly processed. If the message is a struct containing other structs, all the schemas for every struct must be loaded to correctly parse the message. See https://github.com/DaneSlattery/capnp_generic_poc for a proof-of-concept. Add docs and cleanup Add more docs Reduce changes Fix flake8 formatting Fix get datatype
68b5a44
to
a5c29a7
Compare
Adjusted my tests to be async, given the new changes that remove synchronous RPC |
It's in! |
This PR adds the ability to serialize a
Schema.Node
into aDynamicStruct.Reader
, so that schemas can be defined on one end of the channel, and parsed on the other.The PR also implements the
SchemaLoader
, which can load from aSchema.Node
or aDynamicStruct
. This feature is also requested in this issue: #291Needs cleanup: