Commit graph

63 commits

Author SHA1 Message Date
Yian Chen
78dd54e641 address flake8 format check 2024-04-11 19:01:59 -07:00
Tobias Ahrens
302a96d84d
Update documentation to async code (#331) (#332)
* Update documentation to async code (#331)

This commit updates the documentation to the latest changes added
with pycapnp 2.0.0.

* Remove non existing classes/functions from the reference documentation
* Adapt the quickstart to the latest changes. Mainly to new rpc handling,
  that now exlusively is done through asyncio.

* DOC: Add section about send and receive messages over a socket

Since #313 it is possible to read and write messages over a socket.
This commit adds a small section for read and write in the quickstart.
2023-10-16 11:05:27 -07:00
Jacob Alexander
313d0d4c6d Prepare for v2.0.0b1 release
- Update CHANGELOG.md
- Update to bundled capnproto-1.0.1
  * Compiles with capnproto-0.8.0 and higher
- *Breaking Change* Remove allow_cancellation (see
  https://capnproto.org/news/2023-07-28-capnproto-1.0.html)
  * This is tricky to handle for older versions of capnproto. Instead of
    dealing with lots of complication, removing it entirely.
- Fix some documentation after the build backend support was added
- Update tox.ini to support 3.8 to 3.12
- Update cibuildwheel to 2.16.1
  * Adds Python 3.12 supports and implicitly deprecates EOL 3.7 (though it's
    still built)
2023-10-03 12:29:48 -07:00
Tobias Ahrens
d48ffea939
Add custom build backend to support build args (#328)
This implements a custom build backend, inspired by the
[solution used by Pillow.](https://github.com/python-pillow/Pillow/pull/7171)

install-option is deprecated and was removed with pip 23.1. The
comonly accepted solution seems to be to define a custom build
backend for now
https://github.com/pypa/setuptools/issues/2491#issuecomment-1589764230

This commit changes the usage from `--install-option` to `--config-settings`.
2023-10-02 22:30:51 -07:00
Rowan Reeve
a5c29a74d2 Schema loading from the wire
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
2023-06-12 14:10:13 +02:00
Lasse Blaauwbroek
a69bc72a0b Remove a bunch of unused code 2023-06-08 02:42:04 +02:00
André Cruz
1b19b6db13
Prevent race condition in example code (#305)
The example async server code uses timeouts around read() operations.
However, this has a race condition where data can be read, the timeout
fires, and the data is lost.

These timeouts are not really needed in this example code, so I removed
them to prevent people from having strange issues with lost messages
and undefined RPC behavior when using the example code.
2023-01-08 22:29:23 -08:00
rmelick
6d531f0575 Update documentation about from_bytes to use context manager. #287 2022-07-12 09:19:54 -07:00
Madhava Jay
ea70dac5cb Fixed black issues
- Disabled flake8 checks from blocking CI
- Added python 3.10 to packaging and manylinux
2022-04-06 13:32:52 +10:00
Jacob Alexander
6e7fffd7de
Applying black formatting
- Fixing flake8 configuration to agree with black
- Adding black validation check to github actions
2021-10-01 11:12:21 -07:00
Jacob Alexander
a4ef16e831
Fixing flake8 linting errors
- Enabling builds to fail on simple lint failures now
2020-11-20 23:38:13 -08:00
Jacob Alexander
5e8ccba536
Updating docs for v1.0.0b2
- Full cleanup of all the docs
- General sphinx housekeeping
- Updated all the old/bad links
- More reliable tests
- Updated Changelog
- Removed dead/deprecated code
- Added documentation generation test
2020-06-14 17:05:45 -07:00
Jamie Bliss
47adaf603b
Update Installation
Apparently, compiling capnproto separately isn't required anymore.

Update the docs to match.
2020-06-01 16:20:11 -04:00
Fabian Hachenberg
fedbd877ff
fixed wrong rst syntax 2020-02-13 22:47:30 +01:00
Fabian Hachenberg
8cef29f3ed
Fixed link markup, refined link label 2020-02-13 22:46:31 +01:00
Fabian Hachenberg
e914dc8251
Refined description of what happens when you call init multiple times
The original note was misleading in that it implied an actual memory leakage (in the common sense of the term). This is not the case though since the memory is left as dead space in the message but is always correctly freed upon freeing the arena.
2020-02-13 22:43:54 +01:00
Jacob Alexander
b3021e4f6b
Fixing flake8 warnings and errors
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude benchmark

Excluding the benchmark directory (due to protobuf generated files)
Also removing some Python2 specific code
2019-09-27 00:15:13 -07:00
Constantine Vetoshev
f703a7f099 Update segment (de)serialization documentation. 2016-06-24 13:28:35 -07:00
Constantine Vetoshev
42ed1e819f Update documentation to cover segments. 2016-06-23 14:42:45 -07:00
Jason Paryani
dbbf92a83f Fix docs to point at C++ library v0.5.0 2014-12-15 12:24:24 -08:00
Jakub Stasiak
b4ee5039fc Fix schema example in the documentation 2014-04-07 00:36:06 +01:00
Jason Paryani
46fb701899 Small typo fixes in quickstart docs 2014-02-27 18:16:20 -08:00
Jason Paryani
7a4ae96c81 Add documentation for using dicts as typeless structs 2014-01-14 09:05:20 -08:00
Jason Paryani
72ccb5c1b6 Touching up docs a bit 2013-12-18 12:01:27 -08:00
Jason Paryani
f9bb12bff9 Update RPC with simpler methods for connecting 2013-12-12 11:55:50 -08:00
Jason Paryani
110a7c7806 Add restore to docs 2013-12-12 00:20:59 -08:00
Jason Paryani
de7545d285 Small typo fixes in docs 2013-12-12 00:12:15 -08:00
Jason Paryani
37b3e92a14 Update installation docs to point at 0.4 of C++ Cap'n Proto 2013-12-12 00:03:38 -08:00
Jason Paryani
adf8e92003 Update docs for RPC 2013-12-12 00:02:44 -08:00
Jason Paryani
618097dec1 Add ability for passing AnyPointer to restore in RPCClient 2013-12-09 19:18:54 -08:00
Jason Paryani
d1de275187 Add links to main docs 2013-12-02 17:38:22 -08:00
Jason Paryani
2e4efd040b Allow client requests to use positional args 2013-11-14 20:59:21 -08:00
Jason Paryani
37f0dc4a55 Added better docs for installation
* Xcode 5 instructions
* changed from using `pip install .` to `pip install ./pycapnp`
* Added note about using 0.4.x versions of libcapnp
2013-10-02 00:34:26 -07:00
Jason Paryani
a57a99f7fc Update docs 2013-09-04 21:53:05 -07:00
Jason Paryani
a4eec2ef08 Fix even more typos in docs 2013-09-04 12:01:28 -07:00
Jason Paryani
2dc67e6f73 Fix typo in docs 2013-09-04 11:57:58 -07:00
Jason Paryani
f51c34361d Update docs for v0.3.0 release of C++ api 2013-09-04 10:38:00 -07:00
Jason Paryani
e80e002a6c Fix some docs 2013-09-03 22:10:37 -07:00
Jason Paryani
eec8cbe05c Add dictionary methods to docs 2013-09-03 01:24:16 -07:00
Jason Paryani
38cef54ddc Update docs with new import method 2013-09-03 01:16:48 -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
eb9e7511d0 Fix two missed renames 2013-09-01 01:24:59 -07:00
Jason Paryani
f6f02a5ca5 Change all references to old project name 2013-09-01 01:15:31 -07:00
Jason Paryani
bf7be6eeba Update docs for C++ v0.3.0rc5 2013-08-31 19:12:44 -07:00
Jason Paryani
3772198e82 Fix up docs for new C++ RC 2013-08-30 23:13:20 -07:00
Jason Paryani
f0aa4d996b Add docstrings for new functions and _DynamicResizableListBuilder 2013-08-29 18:46:17 -07:00
Jason Paryani
4f327d9a31 Update docs for developers 2013-08-28 22:55:10 -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
c31d63087a Finish up adding docstrings to all public classes/methods 2013-08-26 19:27:58 -07:00