diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 2fcd033..cce1f9b 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -7,6 +7,7 @@ ## Upgrading * Update and fix readme to make use of newest release version 0.8.0 +* Updates the base client to version 0.6. ## New Features diff --git a/pyproject.toml b/pyproject.toml index 038f8b2..e91b06f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ dependencies = [ "grpcio >= 1.54.2, < 2", "grpcio-tools >= 1.54.2, < 2", "protobuf >= 4.25.3, < 6", - "frequenz-client-base[grpcio] >= 0.5.0, < 0.6.0", + "frequenz-client-base >= 0.6.0, < 0.7.0", ] dynamic = ["version"] diff --git a/src/frequenz/client/reporting/_client.py b/src/frequenz/client/reporting/_client.py index 3bb3214..d4dc68b 100644 --- a/src/frequenz/client/reporting/_client.py +++ b/src/frequenz/client/reporting/_client.py @@ -137,7 +137,7 @@ def __iter__(self) -> Iterator[MetricSample]: ) -class ReportingApiClient(BaseApiClient[ReportingStub, grpcaio.Channel]): +class ReportingApiClient(BaseApiClient[ReportingStub]): """A client for the Reporting service.""" def __init__(self, server_url: str, key: str | None = None) -> None: @@ -147,7 +147,7 @@ def __init__(self, server_url: str, key: str | None = None) -> None: server_url: The URL of the Reporting service. key: The API key for the authorization. """ - super().__init__(server_url, ReportingStub, grpcaio.Channel) + super().__init__(server_url, ReportingStub) self._metadata = (("key", key),) if key else () diff --git a/tests/test_client_reporting.py b/tests/test_client_reporting.py index 4bf8ba3..306482b 100644 --- a/tests/test_client_reporting.py +++ b/tests/test_client_reporting.py @@ -4,7 +4,6 @@ """Tests for the frequenz.client.reporting package.""" from unittest.mock import MagicMock, patch -import grpc.aio as grpcaio import pytest from frequenz.api.reporting.v1.reporting_pb2_grpc import ReportingStub from frequenz.client.base.client import BaseApiClient @@ -15,12 +14,10 @@ @pytest.mark.asyncio async def test_client_initialization() -> None: - """Test that the client initializes the BaseApiClient with grpcaio.Channel.""" + """Test that the client initializes the BaseApiClient.""" with patch.object(BaseApiClient, "__init__", return_value=None) as mock_base_init: client = ReportingApiClient("gprc://localhost:50051") # noqa: F841 - mock_base_init.assert_called_once_with( - "gprc://localhost:50051", ReportingStub, grpcaio.Channel - ) + mock_base_init.assert_called_once_with("gprc://localhost:50051", ReportingStub) def test_components_data_batch_is_empty_true() -> None: