Commit Graph

42 Commits

Author SHA1 Message Date
Jason Paryani
1ee7326d71 Merge branch 'feature/v0.4' into develop
Conflicts:
	capnp/capnp.pyx
	capnp/capnp_cpp.pxd
	capnp/schema_cpp.pxd
	setup.py
2013-11-13 22:30:31 -08:00
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
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
105450906b Fix build for clang/python3. Also remove -fpermissive 2013-10-21 00:11:42 -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
630d4467bc Fix changed API for DynamicObject/ObjectPointer 2013-09-24 11:49:38 -07:00
Jason Paryani
83b07d3da8 Fix warnings about <:: 2013-09-19 22:00:33 -07:00
Jason Paryani
da160960af Add handling of DynamicObject 2013-09-18 21:09:17 -07:00
Jason Paryani
8c559cc8b1 Add handling of DynamicObject 2013-09-18 17:19:57 -07:00
Jason Paryani
0187d123c9 Fix from_dict for PyPy 2013-09-04 21:53:13 -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
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
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
684f8ead70 Unify setters for DynamicList and DynamicStruct 2013-08-31 20:00:57 -07:00
Kenton Varda
6731d7eb7d Store Builders by value rather than allocate them separately on the heap (matches treatment of Readers). v0.3 fixes the bug that made this not work. 2013-08-31 17:22:11 -07:00
Kenton Varda
0478ee3081 Add tests based on TestAllTypes from the C++ test.capnp. Fix problems uncovered in capnp.pyx. Requires capnproto-c++-0.3.0-rc5, as I found a bug in the base library. 2013-08-31 16:44:54 -07:00
Kenton Varda
10c6f40c2e Implement __str__ and __repr__ for struct and list builders. __str__ uses prettyPrint while __repr__ shows the type name and the low-whitespace stringification. Also implement __repr__ for StructSchema, just because why not? 2013-08-31 15:07:13 -07:00
Jason Paryani
28b4c442bd Fix change in C++ API of deleted default constructors for builders 2013-08-28 22:55:18 -07:00
Jason Paryani
64b3baa575 Merge branch 'master' of https://github.com/amluto/capnpc-python-cpp into develop
Conflicts:
	capnp/capnp.pyx
	capnp/capnp_cpp.pxd
2013-08-28 16:09:33 -07:00
Andy Lutomirski
2fe61781f5 Expose _StructSchema's raw node 2013-08-28 14:46:53 -07:00
Andy Lutomirski
79ae83a6cb Add some useful _StructSchema, reader, and builder methods
This adds:
 - _StructSchema.fieldnames
 - _DynamicStructBuilder.as_reader
 - _DynamicStruct{Reader,Builder}.schema and __dir__

This makes the reader and builder types much easier to navigate in ipython.
2013-08-28 14:34:37 -07:00
Jason Paryani
448ea93891 Add full orphan functionality. Also, allow special orphan lists
that can grow over time.
2013-08-26 22:00:12 -07:00
Jason Paryani
0856cf413b Remove a bunch of cruft. Also re-namespace all private methods with _ 2013-08-26 15:07:13 -07:00
Jason Paryani
38ba5249c3 Add DynamicOrphan 2013-08-26 14:45:15 -07:00
Jason Paryani
c6250962e6 Add handling of constants in schemas 2013-08-25 17:07:08 -07:00
Jason Paryani
ea1f22e5c6 Fix new error with DynamicValue.Builder no longer being copyable 2013-08-25 16:41:37 -07:00
Jason Paryani
59279ee311 Fix Void namespace change 2013-08-22 17:48:02 -07:00
Jason Paryani
8507eb6901 Fix for the removal of DynamicUnion from the C++ API 2013-08-22 09:18:29 -07:00
Jason Paryani
b4c6ec9fe6 Add querying unnamed enums to structs 2013-08-15 15:44:54 -07:00
Jason Paryani
f411fc216a Use SchemaParser API to remove dependency on subprocess call to compiler 2013-08-13 22:21:38 -07:00
Jason Paryani
0ed0bcf361 Fixed up setup process, cleaned up repo, and updated README 2013-07-06 23:41:19 -07:00