Skip to content

Commit 119e60c

Browse files
authored
Deprecated obsolete replication APIs (#96)
1 parent a249df2 commit 119e60c

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎arangoasync/replication.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ def response_handler(resp: Response) -> Json:
256256
return await self._executor.execute(request, response_handler)
257257

258258
async def server_id(self) -> Result[str]:
259-
"""Return the current server's ID.
259+
"""**Removed** in ArangoDB v3.12.10.
260+
261+
Return the current server's ID.
260262
261263
Returns:
262264
str: Server ID.
@@ -267,6 +269,9 @@ async def server_id(self) -> Result[str]:
267269
References:
268270
- `get-the-replication-server-id <https://docs.arango.ai/arangodb/stable/develop/http-api/replication/other-replication-commands/#get-the-replication-server-id>`__
269271
""" # noqa: E501
272+
m = "/_api/replication/server-id was removed in ArangoDB v3.12.10."
273+
warn(m, DeprecationWarning, stacklevel=2)
274+
270275
request = Request(
271276
method=Method.GET,
272277
endpoint="/_api/replication/server-id",

‎tests/test_database.py‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
ReplicationDumpError,
2525
ReplicationInventoryError,
2626
ReplicationLoggerStateError,
27-
ReplicationServerIDError,
2827
ServerApiCallsError,
2928
ServerAvailableOptionsGetError,
3029
ServerCheckAvailabilityError,
@@ -213,10 +212,6 @@ async def test_replication(db, bad_db, cluster):
213212
await bad_db.replication.logger_state()
214213
result = await db.replication.logger_state()
215214
assert isinstance(result, dict)
216-
with pytest.raises(ReplicationServerIDError):
217-
await bad_db.replication.server_id()
218-
result = await db.replication.server_id()
219-
assert isinstance(result, str)
220215

221216

222217
@pytest.mark.asyncio

0 commit comments

Comments
 (0)