From 8f015203794c64876b85c577a2ddabb5138652ca Mon Sep 17 00:00:00 2001 From: Alex Petenchea Date: Mon, 28 Jul 2025 17:43:24 +0000 Subject: [PATCH 1/3] Deprecating load method --- arango/collection.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arango/collection.py b/arango/collection.py index a48bfd2..588496a 100644 --- a/arango/collection.py +++ b/arango/collection.py @@ -537,10 +537,19 @@ def response_handler(resp: Response) -> Json: def load(self) -> Result[bool]: """Load the collection into memory. + .. note:: + The load function is deprecated from version 3.8.0 onwards and is a + no-op from version 3.9.0 onwards. It should no longer be used, as it + may be removed in a future version of ArangoDB. + :return: True if collection was loaded successfully. :rtype: bool :raise arango.exceptions.CollectionLoadError: If operation fails. """ + + m = "The load function is deprecated from version 3.8.0 onwards and is a no-op from version 3.9.0 onwards." # noqa: E501 + warn(m, DeprecationWarning, stacklevel=2) + request = Request(method="put", endpoint=f"/_api/collection/{self.name}/load") def response_handler(resp: Response) -> bool: From 48c33065e466a317d4f767560b34d334ae02a15e Mon Sep 17 00:00:00 2001 From: Alex Petenchea Date: Mon, 28 Jul 2025 17:44:52 +0000 Subject: [PATCH 2/3] Deprecating unload method --- arango/collection.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arango/collection.py b/arango/collection.py index 588496a..2b13884 100644 --- a/arango/collection.py +++ b/arango/collection.py @@ -546,7 +546,6 @@ def load(self) -> Result[bool]: :rtype: bool :raise arango.exceptions.CollectionLoadError: If operation fails. """ - m = "The load function is deprecated from version 3.8.0 onwards and is a no-op from version 3.9.0 onwards." # noqa: E501 warn(m, DeprecationWarning, stacklevel=2) @@ -562,10 +561,18 @@ def response_handler(resp: Response) -> bool: def unload(self) -> Result[bool]: """Unload the collection from memory. + .. note:: + The unload function is deprecated from version 3.8.0 onwards and is a + no-op from version 3.9.0 onwards. It should no longer be used, as it + may be removed in a future version of ArangoDB. + :return: True if collection was unloaded successfully. :rtype: bool :raise arango.exceptions.CollectionUnloadError: If operation fails. """ + m = "The unload function is deprecated from version 3.8.0 onwards and is a no-op from version 3.9.0 onwards." # noqa: E501 + warn(m, DeprecationWarning, stacklevel=2) + request = Request(method="put", endpoint=f"/_api/collection/{self.name}/unload") def response_handler(resp: Response) -> bool: From cd67437eb78465df12efd9ea5eb79ae06c8918b6 Mon Sep 17 00:00:00 2001 From: Alex Petenchea Date: Mon, 28 Jul 2025 20:08:04 +0000 Subject: [PATCH 3/3] Minor comment correction --- arango/backup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arango/backup.py b/arango/backup.py index c06e4e1..d82e8e2 100644 --- a/arango/backup.py +++ b/arango/backup.py @@ -33,7 +33,7 @@ def get(self, backup_id: Optional[str] = None) -> Result[Json]: :type backup_id: str :return: Backup details. :rtype: dict - :raise arango.exceptions.BackupGetError: If delete fails. + :raise arango.exceptions.BackupGetError: If the operation fails. """ request = Request( method="post",