Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions arangoasync/replication.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


from typing import Optional
from warnings import warn

from arangoasync.exceptions import (
ReplicationApplierConfigError,
Expand Down Expand Up @@ -195,7 +196,9 @@ def response_handler(resp: Response) -> Json:
return await self._executor.execute(request, response_handler)

async def applier_config(self) -> Result[Json]:
"""Return the configuration of the replication applier.
"""**Removed** in ArangoDB v3.12.10.

Return the configuration of the replication applier.

Returns:
dict: Configuration of the replication applier.
Expand All @@ -206,6 +209,9 @@ async def applier_config(self) -> Result[Json]:
References:
- `get-the-replication-applier-configuration <https://docs.arango.ai/arangodb/stable/develop/http-api/replication/replication-applier/#get-the-replication-applier-configuration>`__
""" # noqa: E501
m = "/_api/replication/applier-config was removed in ArangoDB v3.12.10."
warn(m, DeprecationWarning, stacklevel=2)

request = Request(
method=Method.GET,
endpoint="/_api/replication/applier-config",
Expand All @@ -220,7 +226,9 @@ def response_handler(resp: Response) -> Json:
return await self._executor.execute(request, response_handler)

async def applier_state(self) -> Result[Json]:
"""Return the state of the replication applier.
"""**Removed** in ArangoDB v3.12.10.

Return the state of the replication applier.

Returns:
dict: State of the replication applier.
Expand All @@ -231,6 +239,9 @@ async def applier_state(self) -> Result[Json]:
References:
- `get-the-replication-applier-state <https://docs.arango.ai/arangodb/stable/develop/http-api/replication/replication-applier/#get-the-replication-applier-state>`__
""" # noqa: E501
m = "/_api/replication/applier-state was removed in ArangoDB v3.12.10."
warn(m, DeprecationWarning, stacklevel=2)

request = Request(
method=Method.GET,
endpoint="/_api/replication/applier-state",
Expand Down
10 changes: 0 additions & 10 deletions tests/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
DatabaseSupportInfoError,
JWTSecretListError,
JWTSecretReloadError,
ReplicationApplierConfigError,
ReplicationApplierStateError,
ReplicationClusterInventoryError,
ReplicationDumpError,
ReplicationInventoryError,
Expand Down Expand Up @@ -215,14 +213,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(ReplicationApplierConfigError):
await bad_db.replication.applier_config()
result = await db.replication.applier_config()
assert isinstance(result, dict)
with pytest.raises(ReplicationApplierStateError):
await bad_db.replication.applier_state()
result = await db.replication.applier_state()
assert isinstance(result, dict)
with pytest.raises(ReplicationServerIDError):
await bad_db.replication.server_id()
result = await db.replication.server_id()
Expand Down
Loading