commit | 420af4b4688268c17f49dcebf607edcdf6541487 | [log] [tgz] |
---|---|---|
author | Wyatt Hepler <hepler@google.com> | Thu Aug 05 13:47:20 2021 -0700 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Aug 16 20:58:41 2021 +0000 |
tree | 768f103cc02abef42e8cf94341a8c45aaffbe724 | |
parent | 1a88725edb3e6ef4c0375cc10d897ae00885312c [diff] |
pw_rpc: Python client improvements - Use the Call object directly as the context object. This is simpler and makes cancelling prior calls easier. - Return the previous context when a duplicate RPC is called. - Cancel the prior RPC call when the same RPC is called again on the same channel. - Update the response iteration API. - Don't use "block" since it is redundant with timeout_s=0. - Accept optional "count" arg for how many responses to receive. - Don't cancel the RPC if iteration fails. If there is a server error, the RPC will be terminated anyway. The user may cancel directly on the call object or by using it in a with block. - Remove accidental get_responses on client streaming RPCs. - Propagate exceptions from user callbacks so they aren't just logged. - Add unit and integration tests. Change-Id: I01a322b067f1b01ac0443024b9f7bdc345309a47 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/56553 Reviewed-by: Keir Mierle <keir@google.com> Commit-Queue: Wyatt Hepler <hepler@google.com> Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
See our website: http://pigweed.dev