diff --git a/arango/aql.py b/arango/aql.py index b71dc88d..dbbd5c2a 100644 --- a/arango/aql.py +++ b/arango/aql.py @@ -654,6 +654,8 @@ def response_handler(resp: Response) -> Json: def functions(self) -> Result[Jsons]: """List the AQL functions defined in the database. + .. warning:: AQL User Functions are no longer available in ArangoDB 4.0. + :return: AQL functions. :rtype: [dict] :raise arango.exceptions.AQLFunctionListError: If retrieval fails. @@ -676,6 +678,8 @@ def response_handler(resp: Response) -> Jsons: def create_function(self, name: str, code: str) -> Result[Json]: """Create a new AQL function. + .. warning:: AQL User Functions are no longer available in ArangoDB 4.0. + :param name: AQL function name. :type name: str :param code: Function definition in Javascript. @@ -703,6 +707,8 @@ def delete_function( ) -> Result[Union[bool, Json]]: """Delete an AQL function. + .. warning:: AQL User Functions are no longer available in ArangoDB 4.0. + :param name: AQL function name. :type name: str :param group: If set to True, value of parameter **name** is treated diff --git a/arango/cluster.py b/arango/cluster.py index 78fd3ac9..ef35a390 100644 --- a/arango/cluster.py +++ b/arango/cluster.py @@ -144,6 +144,11 @@ def response_handler(resp: Response) -> int: def server_statistics(self, server_id: str) -> Result[Json]: """Return the statistics for the given server. + .. warning:: + DB Server Statistics are no longer available in ArangoDB 4.0. + Use :meth:`Database.metrics ` + instead. + :param server_id: Server ID. :type server_id: str :return: Statistics for the given server. diff --git a/arango/collection.py b/arango/collection.py index 5dadc1e7..ce99c72f 100644 --- a/arango/collection.py +++ b/arango/collection.py @@ -542,7 +542,7 @@ def load(self) -> Result[bool]: .. 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. + is removed from ArangoDB 4.0. :return: True if collection was loaded successfully. :rtype: bool @@ -566,7 +566,7 @@ def unload(self) -> Result[bool]: .. 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. + is removed from ArangoDB 4.0. :return: True if collection was unloaded successfully. :rtype: bool @@ -849,6 +849,8 @@ def find_near( ) -> Result[Cursor]: """Return documents near a given coordinate. + .. warning:: This functionality is deprecated in ArangoDB 4.0. + Documents returned are sorted according to distance, with the nearest document being the first. If there are documents of equal distance, they are randomly chosen from the set until the limit is reached. A geo @@ -974,6 +976,8 @@ def find_in_radius( ) -> Result[Cursor]: """Return documents within a given radius around a coordinate. + .. warning:: This functionality is deprecated in ArangoDB 4.0. + A geo index must be defined in the collection to use this method. :param latitude: Latitude. @@ -1147,6 +1151,11 @@ def find_by_text( ) -> Result[Cursor]: """Return documents that match the given fulltext query. + .. warning:: + + Fulltext indexes are no longer supported and have been replaced + by ArangoSearch (inverted indexes). + :param field: Document field with fulltext index. :type field: str :param query: Fulltext query. diff --git a/arango/database.py b/arango/database.py index bf1834a2..d4a5d8ed 100644 --- a/arango/database.py +++ b/arango/database.py @@ -181,6 +181,8 @@ def wal(self) -> WAL: def foxx(self) -> Foxx: """Return Foxx API wrapper. + .. warning:: Foxx microservice features are no longer available in ArangoDB 4.0. + :return: Foxx API wrapper. :rtype: arango.foxx.Foxx """ @@ -244,6 +246,10 @@ def response_handler(resp: Response) -> Json: def execute(self, command: str) -> Result[Any]: """Execute raw Javascript command on the server. + .. warning:: + + Javascript command execution is no longer available in ArangoDB 4.0. + Executes the JavaScript code in the body on the server as the body of a function with no arguments. If you have a return statement then the return value you produce will be returned @@ -569,6 +575,8 @@ def response_handler(resp: Response) -> Json: def required_db_version(self) -> Result[str]: """Return required version of target database. + .. warning:: Required version endpoint is no longer available in ArangoDB 4.0. + :return: Required version of target database. :rtype: str :raise arango.exceptions.ServerRequiredDBVersionError: If retrieval fails. @@ -604,6 +612,11 @@ def response_handler(resp: Response) -> Json: def statistics(self, description: bool = False) -> Result[Json]: """Return server statistics. + .. warning:: + Server Statistics are no longer available in ArangoDB 4.0. + Use :meth:`Database.metrics ` + instead. + :return: Server statistics. :rtype: dict :raise arango.exceptions.ServerStatisticsError: If retrieval fails. @@ -710,6 +723,8 @@ def echo(self, body: Optional[Any] = None) -> Result[Json]: """Return details of the last request (e.g. headers, payload), or echo the given request body. + .. warning:: Request echoing is no longer available in ArangoDB 4.0. + :param body: The body of the request. Can be of any type and is simply forwarded. If not set, the details of the last request are returned. @@ -1098,6 +1113,8 @@ def response_handler(resp: Response) -> Json: def reload_routing(self) -> Result[bool]: """Reload the routing information. + .. warning:: Route reloading is no longer available in ArangoDB 4.0. + :return: True if routing was reloaded successfully. :rtype: bool :raise arango.exceptions.ServerReloadRoutingError: If reload fails. @@ -2271,6 +2288,8 @@ def delete_document( def tasks(self) -> Result[Jsons]: """Return all currently active server tasks. + .. warning:: Tasks are no longer available in ArangoDB 4.0. + :return: Currently active server tasks. :rtype: [dict] :raise arango.exceptions.TaskListError: If retrieval fails. @@ -2288,6 +2307,8 @@ def response_handler(resp: Response) -> Jsons: def task(self, task_id: str) -> Result[Json]: """Return the details of an active server task. + .. warning:: Tasks are no longer available in ArangoDB 4.0. + :param task_id: Server task ID. :type task_id: str :return: Server task details. @@ -2314,6 +2335,8 @@ def create_task( ) -> Result[Json]: """Create a new server task. + .. warning:: Tasks are no longer available in ArangoDB 4.0. + :param name: Name of the server task. :type name: str :param command: Javascript command to execute. @@ -2357,6 +2380,8 @@ def response_handler(resp: Response) -> Json: def delete_task(self, task_id: str, ignore_missing: bool = False) -> Result[bool]: """Delete a server task. + .. warning:: Tasks are no longer available in ArangoDB 4.0. + :param task_id: Server task ID. :type task_id: str :param ignore_missing: Do not raise an exception on missing task. diff --git a/arango/foxx.py b/arango/foxx.py index 41f61f52..e0601a25 100644 --- a/arango/foxx.py +++ b/arango/foxx.py @@ -37,7 +37,10 @@ class Foxx(ApiGroup): - """Foxx API wrapper.""" + """Foxx API wrapper. + + .. warning:: Foxx microservice features are no longer available in ArangoDB 4.0. + """ def __repr__(self) -> str: return f"" diff --git a/arango/wal.py b/arango/wal.py index 936eced1..1527b18d 100644 --- a/arango/wal.py +++ b/arango/wal.py @@ -56,7 +56,7 @@ def configure( throttle_wait: Optional[int] = None, throttle_limit: Optional[int] = None, ) -> Result[Json]: - """Configure WAL properties. **Removed in ArangoDB v4.0.0. + """Configure WAL properties. **Removed in ArangoDB v4.0.0.** :param oversized_ops: If set to True, operations bigger than a single log file are allowed to be executed and stored. diff --git a/docs/aql.rst b/docs/aql.rst index d6187134..d05506dd 100644 --- a/docs/aql.rst +++ b/docs/aql.rst @@ -83,6 +83,10 @@ See :ref:`AQL` for API specification. AQL User Functions ================== +.. warning:: + AQL User Functions are no longer available in ArangoDB 4.0. + + **AQL User Functions** are custom functions you define in Javascript to extend AQL functionality. They are somewhat similar to SQL procedures. diff --git a/docs/cluster.rst b/docs/cluster.rst index fdb45bca..cb5a3cbc 100644 --- a/docs/cluster.rst +++ b/docs/cluster.rst @@ -85,7 +85,6 @@ Below is an example on how to manage clusters using python-arango. server_id = cluster.server_id() cluster.server_engine(server_id) cluster.server_version(server_id) - cluster.server_statistics(server_id) cluster.server_maintenance_mode(server_id) # Toggle Server maintenance mode (allowed values are "normal" and "maintenance"). diff --git a/docs/collection.rst b/docs/collection.rst index 87d7f0f9..e896f8ef 100644 --- a/docs/collection.rst +++ b/docs/collection.rst @@ -43,8 +43,6 @@ Here is an example showing how you can manage standard collections: students.count() # Perform various operations. - students.load() - students.unload() students.truncate() students.configure() diff --git a/docs/foxx.rst b/docs/foxx.rst index 734a3168..0e48262a 100644 --- a/docs/foxx.rst +++ b/docs/foxx.rst @@ -1,6 +1,10 @@ Foxx ---- +.. warning:: + Foxx microservice features are no longer available in ArangoDB 4.0. + + Python-arango provides support for **Foxx**, a microservice framework which lets you define custom HTTP endpoints to extend ArangoDB's REST API. For more information, refer to `ArangoDB manual`_. diff --git a/docs/simple.rst b/docs/simple.rst index 8f28f634..449dd92b 100644 --- a/docs/simple.rst +++ b/docs/simple.rst @@ -47,11 +47,8 @@ Here are all simple query (and other utility) methods available: * :func:`arango.collection.Collection.all` * :func:`arango.collection.Collection.find` -* :func:`arango.collection.Collection.find_near` * :func:`arango.collection.Collection.find_in_range` -* :func:`arango.collection.Collection.find_in_radius` * :func:`arango.collection.Collection.find_in_box` -* :func:`arango.collection.Collection.find_by_text` * :func:`arango.collection.Collection.get_many` * :func:`arango.collection.Collection.ids` * :func:`arango.collection.Collection.keys` diff --git a/docs/task.rst b/docs/task.rst index 8ebd2484..cc2ab4b1 100644 --- a/docs/task.rst +++ b/docs/task.rst @@ -1,6 +1,10 @@ Tasks ----- +.. warning:: + Tasks are no longer available in ArangoDB 4.0. + + ArangoDB can schedule user-defined Javascript snippets as one-time or periodic (re-scheduled after each execution) tasks. Tasks are executed in the context of the database they are defined in.