Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 1, 2024

Updates the requirements on frequenz-client-base to permit the latest version.

Release notes

Sourced from frequenz-client-base's releases.

v0.7.0

Frequenz Client Base Library Release Notes

Summary

This release improves the BaseApiClient interface and introduces HTTP2 keep-alive, among other changes.

Upgrading

  • GrpcStreamBroadcaster now takes a AsyncIterable instead of a AsyncIterator as the stream_method. This is to match the type of streaming methods generated by grpc, so no conversion to an AsyncIterator is needed.

  • GrpcStreamBroadcaster no longer tries to reconnect when a server closes a connection. This behaviour can be overridden by passing retry_on_exhausted_stream=True when constructing GrpcStreamBroadcaster instances.

  • gRPC URLs don't have a default port anymore, unless a default is set via ChannelOptions. If you want to set a default port for URLs, please pass custom ChannelOptions as defaults to parse_grpc_uri or as channel_defaults to BaseApiClient.

  • The ExponentialBackoff and LinearBackoff classes now require keyword arguments for their constructor. This change was made to make the classes easier to use and to avoid confusion with the order of the arguments.
  • HTTP2 keep-alive is now enabled by default, with an interval of 60 seconds between pings, and a 20 second timeout for responses from the service. These values are configurable and may be updated based on specific requirements.
  • The BaseApiClient class is not generic anymore, and doesn't take a function to create the stub. Instead, subclasses should create their own stub right after calling the parent constructor. This enables subclasses to cast the stub to the generated XxxAsyncStub class, which have proper async type hints. To convert you client:

    # Old
    from my_service_pb2_grpc import MyServiceStub
    class MyApiClient(BaseApiClient[MyServiceStub]):
        def __init__(self, server_url: str, *, ...) -> None:
            super().__init__(server_url, MyServiceStub, ...)
            ...
    New
    from typing import cast
    from my_service_pb2_grpc import MyServiceStub, MyServiceAsyncStub
    class MyApiClient(BaseApiClient):
    def init(self, server_url: str, *, ...) -> None:
    super().init(server_url, connect=connect)
    self._stub = cast(MyServiceAsyncStub, MyServiceStub(self.channel))
    ...
    @property
    def stub(self) -> MyServiceAsyncStub:
        if self._channel is None:
            raise ClientNotConnected(server_url=self.server_url, operation="stub")
        return self._stub

    After this, you should be able to remove a lot of casts or type: ignore from the code when calling the stub async methods.

New Features

  • Added support for HTTP2 keep-alive.

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [frequenz-client-base](https://github.com/frequenz-floss/frequenz-client-base-python) to permit the latest version.
- [Release notes](https://github.com/frequenz-floss/frequenz-client-base-python/releases)
- [Changelog](https://github.com/frequenz-floss/frequenz-client-base-python/blob/v0.x.x/RELEASE_NOTES.md)
- [Commits](frequenz-floss/frequenz-client-base-python@v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: frequenz-client-base
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) label Nov 1, 2024
@dependabot dependabot bot requested a review from a team as a code owner November 1, 2024 03:24
@dependabot dependabot bot added the type:tech-debt Improves the project without visible changes for users label Nov 1, 2024
@dependabot dependabot bot requested a review from a team as a code owner November 1, 2024 03:24
@dependabot dependabot bot requested review from Marenz and thea-leake November 1, 2024 03:24
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Nov 19, 2024

Looks like frequenz-client-base is up-to-date now, so this is no longer needed.

@dependabot dependabot bot closed this Nov 19, 2024
@dependabot dependabot bot deleted the dependabot/pip/frequenz-client-base-gte-0.6.0-and-lt-0.8 branch November 19, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) type:tech-debt Improves the project without visible changes for users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants