summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-23 08:15:37 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-23 08:15:37 +0000
commitf12d63cf90cbba3e2c12b9630ef9266c91bb3ccb (patch)
treea7a86db92172a2a7879b27be2377ca9c2177cb15
parentc3dd8f20ddeac55cbe0cebd68b87252360dfab9f (diff)
automatic import of python-grpc-interceptoropeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-grpc-interceptor.spec65
-rw-r--r--sources2
3 files changed, 54 insertions, 14 deletions
diff --git a/.gitignore b/.gitignore
index fb1ffd1..41295a8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/grpc-interceptor-0.15.0.tar.gz
+/grpc-interceptor-0.15.1.tar.gz
diff --git a/python-grpc-interceptor.spec b/python-grpc-interceptor.spec
index 18b2882..aa81cd6 100644
--- a/python-grpc-interceptor.spec
+++ b/python-grpc-interceptor.spec
@@ -1,11 +1,11 @@
%global _empty_manifest_terminate_build 0
Name: python-grpc-interceptor
-Version: 0.15.0
+Version: 0.15.1
Release: 1
Summary: Simplifies gRPC interceptors
License: MIT
URL: https://github.com/d5h-foss/grpc-interceptor
-Source0: https://mirrors.nju.edu.cn/pypi/web/packages/e2/24/6d43ab428c40aff3b90d59d6b4f9dbc7edd58d6b09c580a28f51245dd1e1/grpc-interceptor-0.15.0.tar.gz
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/10/eb/362916457b7d5f836db1a483c0cd5ffebad0002691869074c8ecad4bb3ed/grpc-interceptor-0.15.1.tar.gz
BuildArch: noarch
Requires: python3-grpcio
@@ -178,9 +178,22 @@ with grpc.insecure_channel("grpc-server:50051") as channel:
...
```
-Client interceptors can also be used to retry RPCs that fail due to specific errors, or
-a host of other use cases. There are some basic approaches in the tests to get you
-started.
+Client interceptors can also be used to
+[retry RPCs](https://github.com/d5h-foss/grpc-interceptor/blob/4b6bb6a59aae97aec058c0d4072dd19de8f408bc/tests/test_client.py#L39-L56)
+that fail due to specific errors, or a host of other use cases. There are some basic
+approaches in
+[the tests](https://github.com/d5h-foss/grpc-interceptor/blob/master/tests/test_client.py)
+to get you started.
+
+Note: The `method` in a client interceptor is a `continuation` as described in the
+[client interceptor section of the gRPC docs](https://grpc.github.io/grpc/python/grpc.html#grpc.UnaryUnaryClientInterceptor.intercept_unary_unary).
+When you invoke the continuation, you get a future back, which resolves to either the
+result, or exception. This is different than invoking a client stub, which returns the
+result directly. If the interceptor needs the value returned by the call, or to catch
+exceptions, then you'll need to do `future = method(request_or_iterator, call_details)`,
+followed by `future.result()`. Check out the tests for
+[examples](https://github.com/d5h-foss/grpc-interceptor/blob/4b6bb6a59aae97aec058c0d4072dd19de8f408bc/tests/test_client.py#L39-L56).
+
# Documentation
@@ -365,9 +378,22 @@ with grpc.insecure_channel("grpc-server:50051") as channel:
...
```
-Client interceptors can also be used to retry RPCs that fail due to specific errors, or
-a host of other use cases. There are some basic approaches in the tests to get you
-started.
+Client interceptors can also be used to
+[retry RPCs](https://github.com/d5h-foss/grpc-interceptor/blob/4b6bb6a59aae97aec058c0d4072dd19de8f408bc/tests/test_client.py#L39-L56)
+that fail due to specific errors, or a host of other use cases. There are some basic
+approaches in
+[the tests](https://github.com/d5h-foss/grpc-interceptor/blob/master/tests/test_client.py)
+to get you started.
+
+Note: The `method` in a client interceptor is a `continuation` as described in the
+[client interceptor section of the gRPC docs](https://grpc.github.io/grpc/python/grpc.html#grpc.UnaryUnaryClientInterceptor.intercept_unary_unary).
+When you invoke the continuation, you get a future back, which resolves to either the
+result, or exception. This is different than invoking a client stub, which returns the
+result directly. If the interceptor needs the value returned by the call, or to catch
+exceptions, then you'll need to do `future = method(request_or_iterator, call_details)`,
+followed by `future.result()`. Check out the tests for
+[examples](https://github.com/d5h-foss/grpc-interceptor/blob/4b6bb6a59aae97aec058c0d4072dd19de8f408bc/tests/test_client.py#L39-L56).
+
# Documentation
@@ -549,9 +575,22 @@ with grpc.insecure_channel("grpc-server:50051") as channel:
...
```
-Client interceptors can also be used to retry RPCs that fail due to specific errors, or
-a host of other use cases. There are some basic approaches in the tests to get you
-started.
+Client interceptors can also be used to
+[retry RPCs](https://github.com/d5h-foss/grpc-interceptor/blob/4b6bb6a59aae97aec058c0d4072dd19de8f408bc/tests/test_client.py#L39-L56)
+that fail due to specific errors, or a host of other use cases. There are some basic
+approaches in
+[the tests](https://github.com/d5h-foss/grpc-interceptor/blob/master/tests/test_client.py)
+to get you started.
+
+Note: The `method` in a client interceptor is a `continuation` as described in the
+[client interceptor section of the gRPC docs](https://grpc.github.io/grpc/python/grpc.html#grpc.UnaryUnaryClientInterceptor.intercept_unary_unary).
+When you invoke the continuation, you get a future back, which resolves to either the
+result, or exception. This is different than invoking a client stub, which returns the
+result directly. If the interceptor needs the value returned by the call, or to catch
+exceptions, then you'll need to do `future = method(request_or_iterator, call_details)`,
+followed by `future.result()`. Check out the tests for
+[examples](https://github.com/d5h-foss/grpc-interceptor/blob/4b6bb6a59aae97aec058c0d4072dd19de8f408bc/tests/test_client.py#L39-L56).
+
# Documentation
@@ -564,7 +603,7 @@ are welcome.
%prep
-%autosetup -n grpc-interceptor-0.15.0
+%autosetup -n grpc-interceptor-0.15.1
%build
%py3_build
@@ -604,5 +643,5 @@ mv %{buildroot}/doclist.lst .
%{_docdir}/*
%changelog
-* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 0.15.0-1
+* Sun Apr 23 2023 Python_Bot <Python_Bot@openeuler.org> - 0.15.1-1
- Package Spec generated
diff --git a/sources b/sources
index e23d6ca..ddef37c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-e37b74a4b7b3b441c576af94d3dd89e8 grpc-interceptor-0.15.0.tar.gz
+6aba689bbe05c86762ac0d35aa0728f6 grpc-interceptor-0.15.1.tar.gz