diff --git a/arangoasync/replication.py b/arangoasync/replication.py index 6a81d44..50f7a5a 100644 --- a/arangoasync/replication.py +++ b/arangoasync/replication.py @@ -256,7 +256,9 @@ def response_handler(resp: Response) -> Json: return await self._executor.execute(request, response_handler) async def server_id(self) -> Result[str]: - """Return the current server's ID. + """**Removed** in ArangoDB v3.12.10. + + Return the current server's ID. Returns: str: Server ID. @@ -267,6 +269,9 @@ async def server_id(self) -> Result[str]: References: - `get-the-replication-server-id `__ """ # noqa: E501 + m = "/_api/replication/server-id was removed in ArangoDB v3.12.10." + warn(m, DeprecationWarning, stacklevel=2) + request = Request( method=Method.GET, endpoint="/_api/replication/server-id", diff --git a/tests/test_database.py b/tests/test_database.py index c9cc14b..6e36951 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -24,7 +24,6 @@ ReplicationDumpError, ReplicationInventoryError, ReplicationLoggerStateError, - ReplicationServerIDError, ServerApiCallsError, ServerAvailableOptionsGetError, ServerCheckAvailabilityError, @@ -213,10 +212,6 @@ async def test_replication(db, bad_db, cluster): await bad_db.replication.logger_state() result = await db.replication.logger_state() assert isinstance(result, dict) - with pytest.raises(ReplicationServerIDError): - await bad_db.replication.server_id() - result = await db.replication.server_id() - assert isinstance(result, str) @pytest.mark.asyncio