python-arango-async 1.1.0__tar.gz → 1.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/PKG-INFO +1 -1
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/aql.py +5 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/collection.py +3 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/database.py +2 -0
- python_arango_async-1.2.1/arangoasync/version.py +1 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/python_arango_async.egg-info/PKG-INFO +1 -1
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_aql.py +8 -1
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_backup.py +6 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_collection.py +2 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_database.py +2 -0
- python_arango_async-1.1.0/arangoasync/version.py +0 -1
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/.circleci/config.yml +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/.github/workflows/codeql.yaml +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/.github/workflows/docs.yaml +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/.github/workflows/pypi.yaml +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/.gitignore +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/.pre-commit-config.yaml +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/.readthedocs.yaml +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/CONTRIBUTING.md +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/LICENSE +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/README.md +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/__init__.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/auth.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/backup.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/client.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/cluster.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/compression.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/connection.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/cursor.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/errno.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/exceptions.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/executor.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/foxx.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/graph.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/http.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/job.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/logger.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/replication.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/request.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/resolver.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/response.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/result.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/serialization.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/arangoasync/typings.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/admin.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/analyzer.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/aql.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/async.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/authentication.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/backup.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/certificates.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/cluster.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/collection.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/compression.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/conf.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/cursor.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/database.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/document.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/errno.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/errors.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/foxx.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/graph.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/helpers.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/http.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/index.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/indexes.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/logging.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/migration.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/overview.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/serialization.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/specs.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/static/logo.png +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/task.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/transaction.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/user.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/docs/view.rst +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/pyproject.toml +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/python_arango_async.egg-info/SOURCES.txt +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/python_arango_async.egg-info/dependency_links.txt +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/python_arango_async.egg-info/requires.txt +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/python_arango_async.egg-info/top_level.txt +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/setup.cfg +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/setup.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/starter.sh +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/__init__.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/conftest.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/helpers.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/static/cluster-3.12.conf +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/static/keyfile +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/static/service.zip +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/static/single-3.12.conf +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_analyzer.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_async.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_client.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_cluster.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_compression.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_connection.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_cursor.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_document.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_foxx.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_graph.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_http.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_resolver.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_task.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_transaction.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_typings.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_user.py +0 -0
- {python_arango_async-1.1.0 → python_arango_async-1.2.1}/tests/test_view.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-arango-async
|
|
3
|
-
Version: 1.1
|
|
3
|
+
Version: 1.2.1
|
|
4
4
|
Summary: Async Python Driver for ArangoDB
|
|
5
5
|
Author-email: Alexandru Petenchea <alexandru.petenchea@arangodb.com>, Anthony Mahanna <anthony.mahanna@arangodb.com>
|
|
6
6
|
Maintainer-email: Alexandru Petenchea <alexandru.petenchea@arangodb.com>, Anthony Mahanna <anthony.mahanna@arangodb.com>
|
|
@@ -369,6 +369,7 @@ class AQL:
|
|
|
369
369
|
enabled: Optional[bool] = None,
|
|
370
370
|
max_slow_queries: Optional[int] = None,
|
|
371
371
|
slow_query_threshold: Optional[int] = None,
|
|
372
|
+
slow_streaming_query_threshold: Optional[int] = None,
|
|
372
373
|
max_query_string_length: Optional[int] = None,
|
|
373
374
|
track_bind_vars: Optional[bool] = None,
|
|
374
375
|
track_slow_queries: Optional[int] = None,
|
|
@@ -382,6 +383,8 @@ class AQL:
|
|
|
382
383
|
entries are discarded first.
|
|
383
384
|
slow_query_threshold (int | None): Runtime threshold (in seconds) for treating a
|
|
384
385
|
query as slow.
|
|
386
|
+
slow_streaming_query_threshold (int | None): Runtime threshold (in seconds) for
|
|
387
|
+
treating a streaming query as slow.
|
|
385
388
|
max_query_string_length (int | None): The maximum query string length (in bytes)
|
|
386
389
|
to keep in the list of queries.
|
|
387
390
|
track_bind_vars (bool | None): If set to `True`, track bind variables used in
|
|
@@ -409,6 +412,8 @@ class AQL:
|
|
|
409
412
|
data["maxQueryStringLength"] = max_query_string_length
|
|
410
413
|
if slow_query_threshold is not None:
|
|
411
414
|
data["slowQueryThreshold"] = slow_query_threshold
|
|
415
|
+
if slow_streaming_query_threshold is not None:
|
|
416
|
+
data["slowStreamingQueryThreshold"] = slow_streaming_query_threshold
|
|
412
417
|
if track_bind_vars is not None:
|
|
413
418
|
data["trackBindVars"] = track_bind_vars
|
|
414
419
|
if track_slow_queries is not None:
|
|
@@ -570,6 +570,7 @@ class Collection(Generic[T, U, V]):
|
|
|
570
570
|
|
|
571
571
|
Raises:
|
|
572
572
|
CollectionConfigureError: If configuration fails.
|
|
573
|
+
ValueError: If parameters are invalid.
|
|
573
574
|
|
|
574
575
|
References:
|
|
575
576
|
- `change-the-properties-of-a-collection <https://docs.arango.ai/arangodb/stable/develop/http-api/collections/#change-the-properties-of-a-collection>`__
|
|
@@ -582,6 +583,8 @@ class Collection(Generic[T, U, V]):
|
|
|
582
583
|
if replication_factor is not None:
|
|
583
584
|
data["replicationFactor"] = replication_factor
|
|
584
585
|
if schema is not None:
|
|
586
|
+
if not isinstance(schema, dict) or len(schema) == 0:
|
|
587
|
+
raise ValueError("schema parameter must be a non-empty dict")
|
|
585
588
|
data["schema"] = schema
|
|
586
589
|
if wait_for_sync is not None:
|
|
587
590
|
data["waitForSync"] = wait_for_sync
|
|
@@ -694,6 +694,8 @@ class Database:
|
|
|
694
694
|
key_options.validate()
|
|
695
695
|
data["keyOptions"] = key_options.to_dict()
|
|
696
696
|
if schema is not None:
|
|
697
|
+
if not isinstance(schema, dict) or len(schema) == 0:
|
|
698
|
+
raise ValueError("schema parameter must be a non-empty dict")
|
|
697
699
|
data["schema"] = schema
|
|
698
700
|
if shard_keys is not None:
|
|
699
701
|
data["shardKeys"] = shard_keys
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.2.1"
|
{python_arango_async-1.1.0 → python_arango_async-1.2.1}/python_arango_async.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-arango-async
|
|
3
|
-
Version: 1.1
|
|
3
|
+
Version: 1.2.1
|
|
4
4
|
Summary: Async Python Driver for ArangoDB
|
|
5
5
|
Author-email: Alexandru Petenchea <alexandru.petenchea@arangodb.com>, Anthony Mahanna <anthony.mahanna@arangodb.com>
|
|
6
6
|
Maintainer-email: Alexandru Petenchea <alexandru.petenchea@arangodb.com>, Anthony Mahanna <anthony.mahanna@arangodb.com>
|
|
@@ -64,9 +64,16 @@ async def test_query_tracking(db, bad_db):
|
|
|
64
64
|
assert tracking.enabled is False
|
|
65
65
|
|
|
66
66
|
# Re-enable.
|
|
67
|
-
tracking = await aql.set_tracking(
|
|
67
|
+
tracking = await aql.set_tracking(
|
|
68
|
+
enabled=True,
|
|
69
|
+
max_slow_queries=5,
|
|
70
|
+
slow_streaming_query_threshold=20,
|
|
71
|
+
slow_query_threshold=15,
|
|
72
|
+
)
|
|
68
73
|
assert tracking.enabled is True
|
|
69
74
|
assert tracking.max_slow_queries == 5
|
|
75
|
+
assert tracking.slow_streaming_query_threshold == 20
|
|
76
|
+
assert tracking.slow_query_threshold == 15
|
|
70
77
|
|
|
71
78
|
# Exceptions with bad database
|
|
72
79
|
with pytest.raises(AQLQueryTrackingGetError):
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
|
|
1
3
|
import pytest
|
|
2
4
|
from packaging import version
|
|
3
5
|
|
|
@@ -36,6 +38,10 @@ async def test_backup(
|
|
|
36
38
|
assert "list" in result
|
|
37
39
|
result = await backup.restore(backup_id)
|
|
38
40
|
assert "previous" in result
|
|
41
|
+
|
|
42
|
+
# Wait for restore to complete
|
|
43
|
+
await asyncio.sleep(10)
|
|
44
|
+
|
|
39
45
|
config = {"local": {"type": "local"}}
|
|
40
46
|
result = await backup.upload(backup_id, repository=backup_path, config=config)
|
|
41
47
|
assert "uploadId" in result
|
|
@@ -50,6 +50,8 @@ async def test_collection_misc_methods(doc_col, bad_col, docs, cluster):
|
|
|
50
50
|
assert new_properties.wait_for_sync == wfs
|
|
51
51
|
with pytest.raises(CollectionConfigureError):
|
|
52
52
|
await bad_col.configure(wait_for_sync=wfs)
|
|
53
|
+
with pytest.raises(ValueError):
|
|
54
|
+
await doc_col.configure(schema={})
|
|
53
55
|
|
|
54
56
|
# Statistics
|
|
55
57
|
statistics = await doc_col.statistics()
|
|
@@ -352,6 +352,8 @@ async def test_create_drop_collection(db, bad_db, cluster):
|
|
|
352
352
|
await db.create_collection(generate_col_name(), col_type=db)
|
|
353
353
|
with pytest.raises(ValueError):
|
|
354
354
|
await db.create_collection(generate_col_name(), key_options={})
|
|
355
|
+
with pytest.raises(ValueError):
|
|
356
|
+
await db.create_collection(generate_col_name(), schema={})
|
|
355
357
|
|
|
356
358
|
# Drop the newly created collection
|
|
357
359
|
assert await db.delete_collection(col_name) is True
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.1.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_arango_async-1.1.0 → python_arango_async-1.2.1}/python_arango_async.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{python_arango_async-1.1.0 → python_arango_async-1.2.1}/python_arango_async.egg-info/requires.txt
RENAMED
|
File without changes
|
{python_arango_async-1.1.0 → python_arango_async-1.2.1}/python_arango_async.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|