Commit graph

355 commits

Author SHA1 Message Date
Jason Paryani
97824b957b Add clear_write_flag method to builders
Fixes #111
2016-08-09 12:26:18 -07:00
Jason Paryani
d85200cee3 Remove recursive loop in KjException.type
Fixes #108
2016-07-29 11:59:02 -07:00
Jason Paryani
4488194f59 Make event loop be lazy initialized for real 2016-07-29 11:57:19 -07:00
Jason Paryani
da233c46ad Make the event loop be lazy initialized
Fixes #101
2016-07-07 12:11:42 -07:00
Constantine Vetoshev
41c418aa1c Use PyObject_AsReadBuffer instead of bytes(). 2016-06-24 16:43:57 -07:00
Constantine Vetoshev
e8a8d26260 Fix memory leak. 2016-06-24 14:03:20 -07:00
Constantine Vetoshev
fb8a3d8ac2 Add docstrings to (de)serialization functions. 2016-06-24 13:28:26 -07:00
Constantine Vetoshev
70e4e2d930 Add ReaderOptions support to segment (de)serialization. 2016-06-24 13:25:27 -07:00
Constantine Vetoshev
09705b6d1f Add support for segment (de)serialization. 2016-06-23 14:32:18 -07:00
Jason Paryani
5ffe7eb2f6 Fix response objects not referencing parents correctly
Fixes #103
2016-06-17 13:50:42 -07:00
Jason Paryani
589400f53a Fix build problem with Cython v0.24
Fixes #97
2016-05-27 13:53:09 -07:00
Mike Lundy
7164f04a7c Eliminate outdated function 2016-03-04 13:52:14 -08:00
Mike Lundy
302fc64041 Include the traceback in exceptions
This makes debugging into the cython side of the code much easier.
2016-03-04 13:52:14 -08:00
Mike Lundy
8c3c57aa32 Make sure to encode to utf-8, not the default encoding
This allows text fields to take unicode strings under python 2.
2016-03-04 13:50:43 -08:00
Jason Paryani
2be308db27 Throw an exception on invalid BufferView instantiation
Also adjust tests to skip mmap under Python 2.
2016-03-04 12:42:45 -08:00
Benjamin Piwowarski
b7a9d05e5e Support mmap objects for reading with from_bytes 2016-02-05 17:32:40 +01:00
Jason Paryani
2516e3e4f1 Change read_multiple and read_multiple_packed to copy by default
Add a `skip_copy` paramter for people that know what they're doing and
need higher performance.

Fixes #87
2015-12-04 16:31:26 -08:00
Jason Paryani
b863e9b9d6 Fix mistakenly discarding the file parameter on reads
Fixes #82
2015-12-04 16:01:28 -08:00
Klee Dienes
8436a1908d Add reraise_kj_exception to the prettyPrint functions. 2015-11-14 18:51:20 -05:00
Sergei Dyshel
4e6f381855 Fix KjException init (missing wrapper). 2015-10-21 15:11:43 +03:00
Jason Paryani
3357771b39 Fixes for changes in cython v0.22.1 2015-07-13 10:57:55 -07:00
Jason Paryani
b57f0f0df8 Add result_type to InterfaceMethodSchema 2015-07-12 12:21:29 -07:00
Jason Paryani
bd0576b68a Add warnings for using old restorer methods 2015-06-16 11:47:13 -07:00
Jason Paryani
819f21938e Fix warning from PyEventPort 2015-06-16 11:28:18 -07:00
Jason Paryani
a4990f0868 Handle AnyPointers better as arguments to RPC functions 2015-06-08 14:59:21 -07:00
Jason Paryani
6f1ce8bcc5 Add support for using keyword arguments with a named struct in an RPC 2015-06-08 13:39:10 -07:00
Jason Paryani
7ff67ebf4a Add bootstrap method to TwoPartyServer 2015-06-04 16:49:46 -07:00
Kamal Marhubi
211192f235 Tidy up _from_list
- remove unused variable
- switch from `range` to `enumerate` for indexed iteration
2015-05-30 19:45:58 -04:00
Jason Paryani
a5bf532d53 Add init method to lists 2015-05-04 11:00:25 -07:00
Jason Paryani
3d77722e88 Add support for unix sockets and improve rpc testing 2015-04-13 16:51:38 -07:00
Jason Paryani
e00bff6ef8 Fix problems with TwoPartyServer
Fixes #61

It turns out I messed up the Server initialization code for the case
where a string is passed in as the address. The tests only cover the
cases where a raw socket is passed in. This will be rectified in a
following commit.
2015-04-13 14:14:40 -07:00
Jason Paryani
be90175f0f Remove types.Enum since it fails on DEBUG builds
It turns out we never should of been creating an ENUM type since it's
prohibited by libcapnp.

Fixes #57
2015-03-10 00:37:48 -07:00
Jason Paryani
2df20212fa Fix possible segfault when importing multiple schemas
It turns out that parseDiskFile expects the imports array to last the
lifetime of the SchemaParser object.

Also, optimized for the case where the imports haven't changed, so we're
not allocating a crazy amount of these imports arrays.
2015-02-24 15:48:48 -08:00
Jason Paryani
6e94182a3e Add bootstrap RPC methods
This is the new way for initializing RPC connections. It replaces the
deprecated restore functionality
2015-02-24 11:22:43 -08:00
John Emhoff
6389708701 Fix destructor order for _MessageReader 2015-02-23 15:03:50 +00:00
Jason Paryani
a62e392feb Fix subtle dealloc ordering problem with MessageReader
It appears that Cython has a subtle issue in deconstruction ordering
that I forgot about. Subclasses will have their deconstructors before
their parent's, and in this case we were dropping a reference to a
buffer that the parent deconstructor expected to exist.
2015-01-30 13:39:58 -08:00
Jason Paryani
88db4abc48 Add read_multiple_bytes/read_multiple_bytes_packed methods 2015-01-28 16:08:47 -08:00
Jason Paryani
2ee4498318 Merge branch 'feature/v0.5' into develop
Conflicts:
	capnp/helpers/helpers.pxd
	capnp/helpers/rpcHelper.h
	capnp/lib/capnp.pxd
	capnp/lib/capnp.pyx
	requirements.txt
	setup.py
	test/test_struct.py
2014-12-15 12:20:26 -08:00
Jason Paryani
0a6ab94390 Fix problem introduced with alignmnet fix 2014-12-12 16:23:24 -08:00
Jason Paryani
06833eb6d5 Fix alignment issues for reading bytes 2014-12-12 14:43:18 -08:00
Jason Paryani
02c572fe1e Fix up libraries a bit
Remove reference to libraries in schema_cpp and list all libraries in
propert order in capnp.pyx
2014-12-11 22:03:13 -08:00
Jason Paryani
2dbeb88db4 Fix PyEventPort for changes in upstream interface 2014-12-09 11:22:19 -08:00
Jason Paryani
b9c9c6bc5c Fix for upstream changes in kj::Exception
* Change from using Nature/Durability to Type
* Prefer to raise KjException directly instead of Value/RuntimError.
* Will still raise AttributeError appropriately.
2014-11-30 14:27:10 -08:00
Rodrigo Benenson
dc14b097e6 Fixed typo in the documentation 2014-11-21 23:59:47 +01:00
Jason Paryani
42c0424e6e Add native types under capnp.types for use with ListSchema 2014-11-20 10:24:10 -08:00
Jason Paryani
d97ec7723d Add .schema field to imported files 2014-11-19 08:10:31 -08:00
Jason Paryani
100019906f Update c++.capnp with upstream file 2014-11-19 08:09:27 -08:00
Jason Paryani
a2ac913c63 Add as_interface/as_list methods to _DynamicObject* 2014-11-19 07:36:40 -08:00
Jason Paryani
4fb74372f2 Allow creation of ListSchema from other Schemas 2014-11-19 02:19:21 -08:00
Jason Paryani
0f0ced971d Add ListSchema class
Return it whenever the appropriate Type is converted to a Schema
2014-11-19 02:04:57 -08:00