Jason Paryani
72c36c3997
Change exception handling code. Now we are directly wrapping
...
kj::Exception and mapping it's 'Nature' enum to Python Error types, and
if none match, return a wrapped KjException
2013-11-13 17:53:34 -08:00
Jason Paryani
0f68366905
Stop using pointer to TwoPartyVatNetwork and replace with Own reference
2013-11-13 12:21:48 -08:00
Jason Paryani
238f8b2c2f
Add get_dependency to all Schema classes
2013-11-13 12:02:43 -08:00
Jason Paryani
11543b7abf
Add ability to pass Restorer to RpcClient. Also various fixups
...
and added __dir__ reflection to DynamicCapabilityClient
2013-11-13 10:58:16 -08:00
Jason Paryani
5251cb5575
Add upcast/cast_as to DynamicCapability. Also changed EventLoop.
...
wait_remote -> wait
2013-11-12 20:28:23 -08:00
Jason Paryani
374f986fa7
Add FdAsyncIoStream. Also clean up RPC interface a bit
2013-11-12 19:38:34 -08:00
Jason Paryani
1df115d359
Initial wrapping of rpc-twoparty functionality
2013-11-12 15:32:23 -08:00
Jason Paryani
91c1bde833
Fix problems compiling with gcc4.7
2013-11-07 14:47:13 -08:00
Jason Paryani
d8bb8206b9
fix up small typos
2013-11-05 15:37:51 -08:00
Jason Paryani
e28a9e6601
Add defaults flag to capnp-json. Also remove 'which' field
2013-10-22 13:32:35 -07:00
Jason Paryani
0498d04632
Add capnp-json serializer script. Also fix bugs in from_dict
2013-10-22 13:22:08 -07:00
Jason Paryani
105450906b
Fix build for clang/python3. Also remove -fpermissive
2013-10-21 00:11:42 -07:00
Jason Paryani
54413dedeb
Add as_builder method to Struct Reader
2013-10-20 22:55:41 -07:00
Jason Paryani
f947e3270f
Add warning when writing the same message more than once
2013-10-20 22:44:15 -07:00
Jason Paryani
5e00534842
Fixup exception handling for capabilities
2013-10-20 17:24:59 -07:00
Jason Paryani
c3354e9069
Add ability to pipeline rpc requests
2013-10-19 22:38:10 -07:00
Jason Paryani
96bfc495d8
Pipelining almost completely wrapped
...
Waiting on some upstream changes in C++ libcapnp before I can finish
2013-10-17 22:42:14 -07:00
Jason Paryani
7f7b28f328
Fix memleak and simplify dynamic client api
2013-10-17 19:15:40 -07:00
Jason Paryani
a5d0abb49f
First working version of capability interfaces
2013-10-15 22:36:14 -07:00
Jason Paryani
9391ed6759
Wrap InterfaceSchema
2013-10-15 13:29:54 -07:00
Jason Paryani
0b67f3aeeb
Fix setting string fields to support all types of strings
2013-10-09 22:36:55 -07:00
Jason Paryani
5639cb14b7
Add dealloc to DynamicObjectBuilder
2013-09-24 13:11:46 -07:00
Jason Paryani
630d4467bc
Fix changed API for DynamicObject/ObjectPointer
2013-09-24 11:49:38 -07:00
Jason Paryani
8c559cc8b1
Add handling of DynamicObject
2013-09-18 17:19:57 -07:00
Jason Paryani
fa5fe5a92c
Fix bug in to_dict not handling which fields properly. Also add
...
exception for fields of type Object, since they're currently unhandled
2013-09-05 16:43:54 -07:00
Jason Paryani
a3f4cf3726
Fix lists of lists or dicts for from_dict
2013-09-04 22:00:42 -07:00
Jason Paryani
6516b7b178
Fix nested lists of structs for from_dict
2013-09-04 21:57:52 -07:00
Jason Paryani
0187d123c9
Fix from_dict for PyPy
2013-09-04 21:53:13 -07:00
Jason Paryani
effacb872f
Fix problem with to_dict
2013-09-04 11:20:05 -07:00
Jason Paryani
777f6b3bce
Fix to_bytes for python3
2013-09-03 22:25:12 -07:00
Jason Paryani
76a354f647
Fix problems from merge
2013-09-03 14:35:34 -07:00
Jason Paryani
5411486d56
Merge branch 'develop' of git://github.com/amluto/capnpc-python-cpp into amluto-develop
...
Conflicts:
capnp/capnp.pyx
2013-09-03 14:34:43 -07:00
Andy Lutomirski
cd0fe97710
Add _DynamicStructBuilder.to_bytes() and <struct module>.read_from_memory
...
to_bytes is not very efficient (it makes one necessary copy and one
unnecessary copy), but it will simplify a lot of use cases.
read_from_memory should be maximally efficient for most input types
(including mmap).
2013-09-03 14:01:07 -07:00
Jason Paryani
dbad76f4ce
Fix new typo...
2013-09-03 11:56:05 -07:00
Jason Paryani
9a410d54ab
Fix typo in read
2013-09-03 11:55:16 -07:00
Jason Paryani
74e27f940f
Change == on StructSchema to return cbool
2013-09-03 11:54:58 -07:00
Andy Lutomirski
b3264a7292
Add Builder and Reader ABCs for each struct type
...
This has zero overhead if not used. I decided that it was simpler
to use ABCs instead of real classes, given that using real classes
offers little benefit.
This also implements == and != for StructSchema objects.
2013-09-03 11:01:12 -07:00
Jason Paryani
80d2e59c08
Fix handling of empty path '' in load_module
2013-09-03 01:03:29 -07:00
Jason Paryani
83e30f5a30
Add from_dict
2013-09-03 01:00:52 -07:00
Jason Paryani
c900690b96
Fix bug in exception handling for which(). Also standardize exceptions
...
to always be ValueError. Add the beginnings of to_dict()
2013-09-03 00:25:32 -07:00
Jason Paryani
4e0db3d16a
Fix up minor things with import hook
2013-09-03 00:21:15 -07:00
Jason Paryani
891f0d28e5
Change import hook to require modules to end in '_capnp'
2013-09-01 23:55:29 -07:00
Jason Paryani
98c9b959f7
Fix up bug with import hook on python3/pypy
2013-09-01 22:24:46 -07:00
Jason Paryani
5600f9939a
Add import monkey patch function
2013-09-01 21:31:39 -07:00
Jason Paryani
1317527893
Change naming for functions to conform to PEP 8. Also deprecate old
...
read/write api.
2013-09-01 20:10:57 -07:00
Jason Paryani
6fcdf841e4
Update preferred method for reading/writing messages from files
2013-09-01 02:13:19 -07:00
Jason Paryani
c3ae2bee67
Change DynamicValue.Reader lists to be returned as _DynamicListReader
2013-09-01 00:09:46 -07:00
Jason Paryani
684f8ead70
Unify setters for DynamicList and DynamicStruct
2013-08-31 20:00:57 -07:00
Jason Paryani
fe991e7857
Fix int/long handling for python3 by removing redundant code
2013-08-31 19:30:07 -07:00
Kenton Varda
1cfea9c846
Add shortcuts for reading from / writing to files. In Python, it doesn't make much sense to force people to muck around with MessageReaders and MessageBuilders since everything is landing on the heap anyway. Instead, let's make it easy: MyType.read[Packed]From(file) reads a file and returns a MyType reader. MyType.newMessage() returns a MyType builder representing the root of a new message. You can call this builder's write[Packed]To(file) method to write it to a file.
2013-08-31 18:19:02 -07:00