frequenz-client-base 0.8.0__tar.gz → 0.8.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/PKG-INFO +1 -1
- frequenz-client-base-0.8.1/RELEASE_NOTES.md +17 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz/client/base/channel.py +5 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz_client_base.egg-info/PKG-INFO +1 -1
- frequenz-client-base-0.8.0/RELEASE_NOTES.md +0 -60
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/LICENSE +0 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/MANIFEST.in +0 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/README.md +0 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/pyproject.toml +0 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/setup.cfg +0 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz/client/base/__init__.py +0 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz/client/base/client.py +0 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz/client/base/conftest.py +0 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz/client/base/conversion.py +0 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz/client/base/exception.py +0 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz/client/base/py.typed +0 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz/client/base/retry.py +0 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz/client/base/streaming.py +0 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz_client_base.egg-info/SOURCES.txt +0 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz_client_base.egg-info/dependency_links.txt +0 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz_client_base.egg-info/requires.txt +0 -0
- {frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz_client_base.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Frequenz Client Base Library Release Notes
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
<!-- Here goes a general summary of what this release is about -->
|
|
6
|
+
|
|
7
|
+
## Upgrading
|
|
8
|
+
|
|
9
|
+
<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
|
|
10
|
+
|
|
11
|
+
## New Features
|
|
12
|
+
|
|
13
|
+
<!-- Here goes the main new features and examples or instructions on how to use them -->
|
|
14
|
+
|
|
15
|
+
## Bug Fixes
|
|
16
|
+
|
|
17
|
+
<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
|
{frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz/client/base/channel.py
RENAMED
|
@@ -101,6 +101,11 @@ def parse_grpc_uri(
|
|
|
101
101
|
enabled. Will raise a `ValueError` if the file cannot be read.
|
|
102
102
|
- `ssl_certificate_chain_path` (str): Path to the certificate chain file. Only
|
|
103
103
|
valid if SSL is enabled. Will raise a `ValueError` if the file cannot be read.
|
|
104
|
+
- `keep_alive` (bool): Enable or disable HTTP2 keep-alive. Defaults to `True`.
|
|
105
|
+
- `keep_alive_interval_s` (float): The interval between HTTP2 pings in seconds.
|
|
106
|
+
Defaults to 60.
|
|
107
|
+
- `keep_alive_timeout_s` (float): The time to wait for a HTTP2 keep-alive response
|
|
108
|
+
in seconds
|
|
104
109
|
|
|
105
110
|
Args:
|
|
106
111
|
uri: The gRPC URI specifying the connection parameters.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Frequenz Client Base Library Release Notes
|
|
2
|
-
|
|
3
|
-
## Upgrading
|
|
4
|
-
|
|
5
|
-
The `BaseApiClient` class is generic again. There was too many issues with the new approach, so it was rolled back.
|
|
6
|
-
|
|
7
|
-
- If you are upgrading from v0.7.x, you should be able to roll back your changes with the upgrade and just keep the new `stub` property.
|
|
8
|
-
|
|
9
|
-
```python
|
|
10
|
-
# Old
|
|
11
|
-
from __future__ import annotations
|
|
12
|
-
import my_service_pb2_grpc
|
|
13
|
-
class MyApiClient(BaseApiClient):
|
|
14
|
-
def __init__(self, server_url: str, *, ...) -> None:
|
|
15
|
-
super().__init__(server_url, ...)
|
|
16
|
-
stub = my_service_pb2_grpc.MyServiceStub(self.channel)
|
|
17
|
-
self._stub: my_service_pb2_grpc.MyServiceAsyncStub = stub # type: ignore
|
|
18
|
-
...
|
|
19
|
-
|
|
20
|
-
@property
|
|
21
|
-
def stub(self) -> my_service_pb2_grpc.MyServiceAsyncStub:
|
|
22
|
-
if self.channel is None:
|
|
23
|
-
raise ClientNotConnected(server_url=self.server_url, operation="stub")
|
|
24
|
-
return self._stub
|
|
25
|
-
|
|
26
|
-
# New
|
|
27
|
-
from __future__ import annotations
|
|
28
|
-
import my_service_pb2_grpc
|
|
29
|
-
from my_service_pb2_grpc import MyServiceStub
|
|
30
|
-
class MyApiClient(BaseApiClient[MyServiceStub]):
|
|
31
|
-
def __init__(self, server_url: str, *, ...) -> None:
|
|
32
|
-
super().__init__(server_url, MyServiceStub, ...)
|
|
33
|
-
...
|
|
34
|
-
|
|
35
|
-
@property
|
|
36
|
-
def stub(self) -> my_service_pb2_grpc.MyServiceAsyncStub:
|
|
37
|
-
"""The gRPC stub for the API."""
|
|
38
|
-
if self.channel is None or self._stub is None:
|
|
39
|
-
raise ClientNotConnected(server_url=self.server_url, operation="stub")
|
|
40
|
-
# This type: ignore is needed because we need to cast the sync stub to
|
|
41
|
-
# the async stub, but we can't use cast because the async stub doesn't
|
|
42
|
-
# actually exists to the eyes of the interpreter, it only exists for the
|
|
43
|
-
# type-checker, so it can only be used for type hints.
|
|
44
|
-
return self._stub # type: ignore
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
- If you are upgrading from v0.6.x, you should only need to add the `stub` property to your client class and then use that property instead of `_stub` in your code.
|
|
48
|
-
|
|
49
|
-
```python
|
|
50
|
-
@property
|
|
51
|
-
def stub(self) -> my_service_pb2_grpc.MyServiceAsyncStub:
|
|
52
|
-
"""The gRPC stub for the API."""
|
|
53
|
-
if self.channel is None or self._stub is None:
|
|
54
|
-
raise ClientNotConnected(server_url=self.server_url, operation="stub")
|
|
55
|
-
# This type: ignore is needed because we need to cast the sync stub to
|
|
56
|
-
# the async stub, but we can't use cast because the async stub doesn't
|
|
57
|
-
# actually exists to the eyes of the interpreter, it only exists for the
|
|
58
|
-
# type-checker, so it can only be used for type hints.
|
|
59
|
-
return self._stub # type: ignore
|
|
60
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz/client/base/__init__.py
RENAMED
|
File without changes
|
{frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz/client/base/client.py
RENAMED
|
File without changes
|
{frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz/client/base/conftest.py
RENAMED
|
File without changes
|
{frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz/client/base/conversion.py
RENAMED
|
File without changes
|
{frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz/client/base/exception.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{frequenz-client-base-0.8.0 → frequenz-client-base-0.8.1}/src/frequenz/client/base/streaming.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|