Skip to content

Commit

Permalink
Deprecating some RequestClient subclasses.
Browse files Browse the repository at this point in the history
Deprecating to help move away from service-specific types in a general
library.
  • Loading branch information
robertbartel committed Aug 10, 2023
1 parent 7e80278 commit 7050ff6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions python/lib/communication/dmod/communication/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
import typing
from abc import ABC, abstractmethod
from asyncio import AbstractEventLoop
from deprecated import deprecated
from pathlib import Path
from typing import Generic, Optional, Type, TypeVar, Union

import websockets

from .maas_request import ExternalRequest, ExternalRequestResponse
from .message import AbstractInitRequest, Response
from .partition_request import PartitionRequest, PartitionResponse
from .dataset_management_message import DatasetManagementMessage, DatasetManagementResponse
from .scheduler_request import SchedulerRequestMessage, SchedulerRequestResponse
from .evaluation_request import EvaluationConnectionRequest
from .partition_request import PartitionResponse
from .dataset_management_message import DatasetManagementResponse
from .scheduler_request import SchedulerRequestResponse
from .evaluation_request import EvaluationConnectionRequestResponse
from .update_message import UpdateMessage, UpdateMessageResponse

Expand Down Expand Up @@ -837,6 +837,7 @@ async def listen(self) -> typing.Union[str, bytes]:
return await websocket.connection.recv()


@deprecated("Use RequestClient or ExternalRequestClient instead")
class SchedulerClient(RequestClient):

def __init__(self, *args, **kwargs):
Expand Down Expand Up @@ -948,6 +949,7 @@ def warnings(self):
return self._warnings


@deprecated("Use RequestClient or ExternalRequestClient instead")
class DataServiceClient(RequestClient):
"""
Client for data service communication between internal DMOD services.
Expand All @@ -957,6 +959,7 @@ def __init__(self, *args, **kwargs):
super().__init__(default_response_type=DatasetManagementResponse, *args, **kwargs)


@deprecated("Use RequestClient or ExternalRequestClient instead")
class PartitionerServiceClient(RequestClient):
"""
A client for interacting with the partitioner service.
Expand All @@ -969,6 +972,7 @@ def __init__(self, *args, **kwargs):
super().__init__(default_response_type=PartitionResponse, *args, **kwargs)


@deprecated("Use RequestClient or ExternalRequestClient instead")
class EvaluationServiceClient(RequestClient):
"""
A client for interacting with the evaluation service
Expand Down

0 comments on commit 7050ff6

Please sign in to comment.