Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit08a2e54

Browse files
authored
Deprecate load/unload methods (#376)
* Deprecating load method* Deprecating unload method* Minor comment correction
1 parent0366a1e commit08a2e54

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

‎arango/backup.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def get(self, backup_id: Optional[str] = None) -> Result[Json]:
3333
:type backup_id: str
3434
:return: Backup details.
3535
:rtype: dict
36-
:raise arango.exceptions.BackupGetError: Ifdelete fails.
36+
:raise arango.exceptions.BackupGetError: Ifthe operation fails.
3737
"""
3838
request=Request(
3939
method="post",

‎arango/collection.py‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,10 +537,18 @@ def response_handler(resp: Response) -> Json:
537537
defload(self)->Result[bool]:
538538
"""Load the collection into memory.
539539
540+
.. note::
541+
The load function is deprecated from version 3.8.0 onwards and is a
542+
no-op from version 3.9.0 onwards. It should no longer be used, as it
543+
may be removed in a future version of ArangoDB.
544+
540545
:return: True if collection was loaded successfully.
541546
:rtype: bool
542547
:raise arango.exceptions.CollectionLoadError: If operation fails.
543548
"""
549+
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
550+
warn(m,DeprecationWarning,stacklevel=2)
551+
544552
request=Request(method="put",endpoint=f"/_api/collection/{self.name}/load")
545553

546554
defresponse_handler(resp:Response)->bool:
@@ -553,10 +561,18 @@ def response_handler(resp: Response) -> bool:
553561
defunload(self)->Result[bool]:
554562
"""Unload the collection from memory.
555563
564+
.. note::
565+
The unload function is deprecated from version 3.8.0 onwards and is a
566+
no-op from version 3.9.0 onwards. It should no longer be used, as it
567+
may be removed in a future version of ArangoDB.
568+
556569
:return: True if collection was unloaded successfully.
557570
:rtype: bool
558571
:raise arango.exceptions.CollectionUnloadError: If operation fails.
559572
"""
573+
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
574+
warn(m,DeprecationWarning,stacklevel=2)
575+
560576
request=Request(method="put",endpoint=f"/_api/collection/{self.name}/unload")
561577

562578
defresponse_handler(resp:Response)->bool:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp