diff --git a/requirements-swh.txt b/requirements-swh.txt --- a/requirements-swh.txt +++ b/requirements-swh.txt @@ -1,2 +1,2 @@ -swh.core[http] >= 0.0.61 +swh.core[http] >= 0.0.65 swh.model >= 0.0.27 diff --git a/swh/objstorage/api/client.py b/swh/objstorage/api/client.py --- a/swh/objstorage/api/client.py +++ b/swh/objstorage/api/client.py @@ -3,7 +3,7 @@ # License: GNU General Public License version 3, or any later version # See top-level LICENSE file for more information -from swh.core.api import SWHRemoteAPI +from swh.core.api import RPCClient from swh.model import hashutil from ..objstorage import DEFAULT_CHUNK_SIZE, DEFAULT_LIMIT @@ -24,7 +24,7 @@ """ def __init__(self, **kwargs): - self._proxy = SWHRemoteAPI(api_exception=ObjStorageAPIError, **kwargs) + self._proxy = RPCClient(api_exception=ObjStorageAPIError, **kwargs) def check_config(self, *, check_write): return self._proxy.post('check_config', {'check_write': check_write}) diff --git a/swh/objstorage/api/server.py b/swh/objstorage/api/server.py --- a/swh/objstorage/api/server.py +++ b/swh/objstorage/api/server.py @@ -8,7 +8,7 @@ import aiohttp.web from swh.core.config import read as config_read -from swh.core.api.asynchronous import (SWHRemoteAPI, decode_request, +from swh.core.api.asynchronous import (RPCServerApp, decode_request, encode_data_server as encode_data) @@ -175,7 +175,7 @@ """ client_max_size = config.get('client_max_size', 1024 * 1024 * 1024) - app = SWHRemoteAPI(client_max_size=client_max_size) + app = RPCServerApp(client_max_size=client_max_size) # retro compatibility configuration settings app['config'] = config _cfg = config['objstorage']