python-arango 8.2.5__tar.gz → 8.3.0__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.
Files changed (92) hide show
  1. {python_arango-8.2.5 → python_arango-8.3.0}/.gitignore +0 -3
  2. {python_arango-8.2.5 → python_arango-8.3.0}/.pre-commit-config.yaml +3 -3
  3. {python_arango-8.2.5 → python_arango-8.3.0}/PKG-INFO +7 -9
  4. {python_arango-8.2.5 → python_arango-8.3.0}/arango/client.py +2 -4
  5. {python_arango-8.2.5 → python_arango-8.3.0}/arango/collection.py +6 -10
  6. {python_arango-8.2.5 → python_arango-8.3.0}/arango/connection.py +2 -2
  7. {python_arango-8.2.5 → python_arango-8.3.0}/arango/database.py +3 -0
  8. {python_arango-8.2.5 → python_arango-8.3.0}/arango/formatter.py +1 -1
  9. {python_arango-8.2.5 → python_arango-8.3.0}/arango/request.py +2 -1
  10. python_arango-8.3.0/arango/version.py +1 -0
  11. {python_arango-8.2.5 → python_arango-8.3.0}/docs/requirements.txt +0 -1
  12. {python_arango-8.2.5 → python_arango-8.3.0}/docs/schema.rst +1 -4
  13. {python_arango-8.2.5 → python_arango-8.3.0}/pyproject.toml +10 -8
  14. {python_arango-8.2.5 → python_arango-8.3.0}/python_arango.egg-info/PKG-INFO +7 -9
  15. {python_arango-8.2.5 → python_arango-8.3.0}/python_arango.egg-info/SOURCES.txt +1 -0
  16. {python_arango-8.2.5 → python_arango-8.3.0}/python_arango.egg-info/requires.txt +5 -7
  17. {python_arango-8.2.5 → python_arango-8.3.0}/.circleci/config.yml +0 -0
  18. {python_arango-8.2.5 → python_arango-8.3.0}/.github/workflows/codeql.yaml +0 -0
  19. {python_arango-8.2.5 → python_arango-8.3.0}/.github/workflows/docs.yaml +0 -0
  20. {python_arango-8.2.5 → python_arango-8.3.0}/.github/workflows/pypi.yaml +0 -0
  21. {python_arango-8.2.5 → python_arango-8.3.0}/.readthedocs.yaml +0 -0
  22. {python_arango-8.2.5 → python_arango-8.3.0}/CONTRIBUTING.md +0 -0
  23. {python_arango-8.2.5 → python_arango-8.3.0}/LICENSE +0 -0
  24. {python_arango-8.2.5 → python_arango-8.3.0}/MANIFEST.in +0 -0
  25. {python_arango-8.2.5 → python_arango-8.3.0}/README.md +0 -0
  26. {python_arango-8.2.5 → python_arango-8.3.0}/arango/__init__.py +0 -0
  27. {python_arango-8.2.5 → python_arango-8.3.0}/arango/api.py +0 -0
  28. {python_arango-8.2.5 → python_arango-8.3.0}/arango/aql.py +0 -0
  29. {python_arango-8.2.5 → python_arango-8.3.0}/arango/backup.py +0 -0
  30. {python_arango-8.2.5 → python_arango-8.3.0}/arango/cluster.py +0 -0
  31. {python_arango-8.2.5 → python_arango-8.3.0}/arango/cursor.py +0 -0
  32. {python_arango-8.2.5 → python_arango-8.3.0}/arango/errno.py +0 -0
  33. {python_arango-8.2.5 → python_arango-8.3.0}/arango/exceptions.py +0 -0
  34. {python_arango-8.2.5 → python_arango-8.3.0}/arango/executor.py +0 -0
  35. {python_arango-8.2.5 → python_arango-8.3.0}/arango/foxx.py +0 -0
  36. {python_arango-8.2.5 → python_arango-8.3.0}/arango/graph.py +0 -0
  37. {python_arango-8.2.5 → python_arango-8.3.0}/arango/http.py +0 -0
  38. {python_arango-8.2.5 → python_arango-8.3.0}/arango/job.py +0 -0
  39. {python_arango-8.2.5 → python_arango-8.3.0}/arango/pregel.py +0 -0
  40. {python_arango-8.2.5 → python_arango-8.3.0}/arango/py.typed +0 -0
  41. {python_arango-8.2.5 → python_arango-8.3.0}/arango/replication.py +0 -0
  42. {python_arango-8.2.5 → python_arango-8.3.0}/arango/resolver.py +0 -0
  43. {python_arango-8.2.5 → python_arango-8.3.0}/arango/response.py +0 -0
  44. {python_arango-8.2.5 → python_arango-8.3.0}/arango/result.py +0 -0
  45. {python_arango-8.2.5 → python_arango-8.3.0}/arango/typings.py +0 -0
  46. {python_arango-8.2.5 → python_arango-8.3.0}/arango/utils.py +0 -0
  47. {python_arango-8.2.5 → python_arango-8.3.0}/arango/wal.py +0 -0
  48. {python_arango-8.2.5 → python_arango-8.3.0}/docs/Makefile +0 -0
  49. {python_arango-8.2.5 → python_arango-8.3.0}/docs/admin.rst +0 -0
  50. {python_arango-8.2.5 → python_arango-8.3.0}/docs/analyzer.rst +0 -0
  51. {python_arango-8.2.5 → python_arango-8.3.0}/docs/aql.rst +0 -0
  52. {python_arango-8.2.5 → python_arango-8.3.0}/docs/async.rst +0 -0
  53. {python_arango-8.2.5 → python_arango-8.3.0}/docs/auth.rst +0 -0
  54. {python_arango-8.2.5 → python_arango-8.3.0}/docs/backup.rst +0 -0
  55. {python_arango-8.2.5 → python_arango-8.3.0}/docs/batch.rst +0 -0
  56. {python_arango-8.2.5 → python_arango-8.3.0}/docs/certificates.rst +0 -0
  57. {python_arango-8.2.5 → python_arango-8.3.0}/docs/cluster.rst +0 -0
  58. {python_arango-8.2.5 → python_arango-8.3.0}/docs/collection.rst +0 -0
  59. {python_arango-8.2.5 → python_arango-8.3.0}/docs/compression.rst +0 -0
  60. {python_arango-8.2.5 → python_arango-8.3.0}/docs/conf.py +0 -0
  61. {python_arango-8.2.5 → python_arango-8.3.0}/docs/contributing.rst +0 -0
  62. {python_arango-8.2.5 → python_arango-8.3.0}/docs/cursor.rst +0 -0
  63. {python_arango-8.2.5 → python_arango-8.3.0}/docs/database.rst +0 -0
  64. {python_arango-8.2.5 → python_arango-8.3.0}/docs/document.rst +0 -0
  65. {python_arango-8.2.5 → python_arango-8.3.0}/docs/errno.rst +0 -0
  66. {python_arango-8.2.5 → python_arango-8.3.0}/docs/errors.rst +0 -0
  67. {python_arango-8.2.5 → python_arango-8.3.0}/docs/foxx.rst +0 -0
  68. {python_arango-8.2.5 → python_arango-8.3.0}/docs/graph.rst +0 -0
  69. {python_arango-8.2.5 → python_arango-8.3.0}/docs/http.rst +0 -0
  70. {python_arango-8.2.5 → python_arango-8.3.0}/docs/index.rst +0 -0
  71. {python_arango-8.2.5 → python_arango-8.3.0}/docs/indexes.rst +0 -0
  72. {python_arango-8.2.5 → python_arango-8.3.0}/docs/logging.rst +0 -0
  73. {python_arango-8.2.5 → python_arango-8.3.0}/docs/make.bat +0 -0
  74. {python_arango-8.2.5 → python_arango-8.3.0}/docs/overload.rst +0 -0
  75. {python_arango-8.2.5 → python_arango-8.3.0}/docs/overview.rst +0 -0
  76. {python_arango-8.2.5 → python_arango-8.3.0}/docs/pregel.rst +0 -0
  77. {python_arango-8.2.5 → python_arango-8.3.0}/docs/replication.rst +0 -0
  78. {python_arango-8.2.5 → python_arango-8.3.0}/docs/serializer.rst +0 -0
  79. {python_arango-8.2.5 → python_arango-8.3.0}/docs/simple.rst +0 -0
  80. {python_arango-8.2.5 → python_arango-8.3.0}/docs/specs.rst +0 -0
  81. {python_arango-8.2.5 → python_arango-8.3.0}/docs/static/logo.png +0 -0
  82. {python_arango-8.2.5 → python_arango-8.3.0}/docs/task.rst +0 -0
  83. {python_arango-8.2.5 → python_arango-8.3.0}/docs/threading.rst +0 -0
  84. {python_arango-8.2.5 → python_arango-8.3.0}/docs/transaction.rst +0 -0
  85. {python_arango-8.2.5 → python_arango-8.3.0}/docs/user.rst +0 -0
  86. {python_arango-8.2.5 → python_arango-8.3.0}/docs/view.rst +0 -0
  87. {python_arango-8.2.5 → python_arango-8.3.0}/docs/wal.rst +0 -0
  88. {python_arango-8.2.5 → python_arango-8.3.0}/python_arango.egg-info/dependency_links.txt +0 -0
  89. {python_arango-8.2.5 → python_arango-8.3.0}/python_arango.egg-info/top_level.txt +0 -0
  90. {python_arango-8.2.5 → python_arango-8.3.0}/setup.cfg +0 -0
  91. {python_arango-8.2.5 → python_arango-8.3.0}/setup.py +0 -0
  92. {python_arango-8.2.5 → python_arango-8.3.0}/starter.sh +0 -0
@@ -119,9 +119,6 @@ node_modules/
119
119
  .envrc
120
120
  .direnv/
121
121
 
122
- # setuptools_scm
123
- arango/version.py
124
-
125
122
  # test results
126
123
  *_results.txt
127
124
 
@@ -18,7 +18,7 @@ repos:
18
18
  - id: trailing-whitespace
19
19
 
20
20
  - repo: https://github.com/psf/black
21
- rev: 23.1.0
21
+ rev: 26.1.0
22
22
  hooks:
23
23
  - id: black
24
24
 
@@ -29,12 +29,12 @@ repos:
29
29
  args: [ --profile, black ]
30
30
 
31
31
  - repo: https://github.com/PyCQA/flake8
32
- rev: 6.0.0
32
+ rev: 7.3.0
33
33
  hooks:
34
34
  - id: flake8
35
35
 
36
36
  - repo: https://github.com/pre-commit/mirrors-mypy
37
- rev: v0.991
37
+ rev: v1.15.0
38
38
  hooks:
39
39
  - id: mypy
40
40
  files: ^arango/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-arango
3
- Version: 8.2.5
3
+ Version: 8.3.0
4
4
  Summary: Python Driver for ArangoDB
5
5
  Author-email: Joohwan Oh <joohwan.oh@outlook.com>
6
6
  Maintainer-email: Joohwan Oh <joohwan.oh@outlook.com>, Alexandru Petenchea <alex.petenchea@gmail.com>, Anthony Mahanna <anthony.mahanna@arangodb.com>
@@ -39,21 +39,19 @@ Classifier: Programming Language :: Python :: 3.11
39
39
  Classifier: Programming Language :: Python :: 3.12
40
40
  Classifier: Topic :: Documentation :: Sphinx
41
41
  Classifier: Typing :: Typed
42
- Requires-Python: >=3.9
42
+ Requires-Python: >=3.10
43
43
  Description-Content-Type: text/markdown
44
44
  License-File: LICENSE
45
45
  Requires-Dist: urllib3>=1.26.0
46
46
  Requires-Dist: requests
47
47
  Requires-Dist: requests_toolbelt
48
- Requires-Dist: PyJWT
49
- Requires-Dist: setuptools>=42
50
- Requires-Dist: importlib_metadata>=4.7.1
48
+ Requires-Dist: PyJWT>=2.10.0
51
49
  Requires-Dist: packaging>=23.1
52
50
  Provides-Extra: dev
53
- Requires-Dist: black>=22.3.0; extra == "dev"
54
- Requires-Dist: flake8>=4.0.1; extra == "dev"
55
- Requires-Dist: isort>=5.10.1; extra == "dev"
56
- Requires-Dist: mypy>=0.942; extra == "dev"
51
+ Requires-Dist: black==26.1.0; extra == "dev"
52
+ Requires-Dist: flake8==7.3.0; extra == "dev"
53
+ Requires-Dist: isort==5.10.1; extra == "dev"
54
+ Requires-Dist: mypy==1.15.0; extra == "dev"
57
55
  Requires-Dist: mock; extra == "dev"
58
56
  Requires-Dist: pre-commit>=2.17.0; extra == "dev"
59
57
  Requires-Dist: pytest>=7.1.1; extra == "dev"
@@ -3,8 +3,6 @@ __all__ = ["ArangoClient"]
3
3
  from json import dumps, loads
4
4
  from typing import Any, Callable, Optional, Sequence, Union
5
5
 
6
- import importlib_metadata
7
-
8
6
  from arango.connection import (
9
7
  BasicConnection,
10
8
  Connection,
@@ -27,6 +25,7 @@ from arango.resolver import (
27
25
  RoundRobinHostResolver,
28
26
  SingleHostResolver,
29
27
  )
28
+ from arango.version import __version__
30
29
 
31
30
 
32
31
  def default_serializer(x: Any) -> str:
@@ -175,8 +174,7 @@ class ArangoClient:
175
174
  :return: Client version.
176
175
  :rtype: str
177
176
  """
178
- version: str = importlib_metadata.version("python-arango")
179
- return version
177
+ return __version__
180
178
 
181
179
  @property
182
180
  def request_timeout(self) -> Any:
@@ -400,6 +400,8 @@ class Collection(ApiGroup):
400
400
  if sync is not None:
401
401
  data["waitForSync"] = sync
402
402
  if schema is not None:
403
+ if not isinstance(schema, dict) or len(schema) == 0:
404
+ raise ValueError("schema parameter must be a non-empty dict")
403
405
  data["schema"] = schema
404
406
  if replication_factor is not None:
405
407
  data["replicationFactor"] = replication_factor
@@ -871,9 +873,7 @@ class Collection(ApiGroup):
871
873
  query = """
872
874
  FOR doc IN NEAR(@collection, @latitude, @longitude{})
873
875
  RETURN doc
874
- """.format(
875
- "" if limit is None else ", @limit "
876
- )
876
+ """.format("" if limit is None else ", @limit ")
877
877
 
878
878
  bind_vars = {
879
879
  "collection": self._name,
@@ -996,9 +996,7 @@ class Collection(ApiGroup):
996
996
  query = """
997
997
  FOR doc IN WITHIN(@@collection, @latitude, @longitude, @radius{})
998
998
  RETURN doc
999
- """.format(
1000
- "" if distance_field is None else ", @distance"
1001
- )
999
+ """.format("" if distance_field is None else ", @distance")
1002
1000
 
1003
1001
  bind_vars = {
1004
1002
  "@collection": self._name,
@@ -1080,7 +1078,7 @@ class Collection(ApiGroup):
1080
1078
  coord_str = ""
1081
1079
  if index is None:
1082
1080
  # Find the first geo index
1083
- for collection_index in self.indexes(): # type:ignore[union-attr]
1081
+ for collection_index in self.indexes(): # type: ignore[union-attr]
1084
1082
  if collection_index["type"] == "geo":
1085
1083
  coord_str = build_coord_str_from_index(collection_index)
1086
1084
  break
@@ -1168,9 +1166,7 @@ class Collection(ApiGroup):
1168
1166
  aql = """
1169
1167
  FOR doc IN FULLTEXT(@collection, @field, @query{})
1170
1168
  RETURN doc
1171
- """.format(
1172
- "" if limit is None else ", @limit"
1173
- )
1169
+ """.format("" if limit is None else ", @limit")
1174
1170
 
1175
1171
  request = Request(
1176
1172
  method="post",
@@ -464,7 +464,7 @@ class JwtConnection(BaseConnection):
464
464
  "verify_iat": True,
465
465
  "verify_exp": True,
466
466
  "verify_signature": False,
467
- },
467
+ }, # type: ignore[arg-type]
468
468
  )
469
469
  except ExpiredSignatureError:
470
470
  raise JWTExpiredError("JWT token is expired")
@@ -554,7 +554,7 @@ class JwtSuperuserConnection(BaseConnection):
554
554
  "verify_iat": True,
555
555
  "verify_exp": True,
556
556
  "verify_signature": False,
557
- },
557
+ }, # type: ignore[arg-type]
558
558
  )
559
559
  except ExpiredSignatureError:
560
560
  raise JWTExpiredError("JWT token is expired")
@@ -1668,6 +1668,7 @@ class Database(ApiGroup):
1668
1668
  :return: Standard collection API wrapper.
1669
1669
  :rtype: arango.collection.StandardCollection
1670
1670
  :raise arango.exceptions.CollectionCreateError: If create fails.
1671
+ :raise ValueError: If parameters are invalid.
1671
1672
  """
1672
1673
  key_options: Json = {"type": key_generator, "allowUserKeys": user_keys}
1673
1674
  if key_generator == "autoincrement":
@@ -1698,6 +1699,8 @@ class Database(ApiGroup):
1698
1699
  if write_concern is not None:
1699
1700
  data["writeConcern"] = write_concern
1700
1701
  if schema is not None:
1702
+ if not isinstance(schema, dict) or len(schema) == 0:
1703
+ raise ValueError("schema parameter must be a non-empty dict")
1701
1704
  data["schema"] = schema
1702
1705
  if computedValues is not None:
1703
1706
  data["computedValues"] = computedValues
@@ -1112,7 +1112,7 @@ def format_backup_dbserver(body: Json) -> Json:
1112
1112
  :return: Formatted body.
1113
1113
  :rtype: dict
1114
1114
  """
1115
- return {"status": body["Status"]}
1115
+ return {"status": body.get("Status")}
1116
1116
 
1117
1117
 
1118
1118
  def format_backup_transfer(body: Json) -> Json:
@@ -3,6 +3,7 @@ __all__ = ["Request"]
3
3
  from typing import Any, MutableMapping, Optional
4
4
 
5
5
  from arango.typings import DriverFlags, Fields, Headers, Params
6
+ from arango.version import __version__
6
7
 
7
8
 
8
9
  def normalize_headers(
@@ -12,7 +13,7 @@ def normalize_headers(
12
13
  if driver_flags is not None:
13
14
  for flag in driver_flags:
14
15
  flags = flags + flag + ";"
15
- driver_version = "8.2.5"
16
+ driver_version = __version__
16
17
  driver_header = "python-arango/" + driver_version + " (" + flags + ")"
17
18
  normalized_headers: Headers = {
18
19
  "charset": "utf-8",
@@ -0,0 +1 @@
1
+ __version__ = "8.3.0"
@@ -1,4 +1,3 @@
1
1
  requests_toolbelt
2
- importlib_metadata
3
2
  PyJWT
4
3
  sphinx_rtd_theme
@@ -3,7 +3,7 @@ Schema Validation
3
3
 
4
4
  ArangoDB supports document validation using JSON schemas. You can use this
5
5
  feature by providing a schema during collection creation using the ``schema``
6
- parameter.
6
+ parameter. It must not be an empty ``dict```.
7
7
 
8
8
  **Example:**
9
9
 
@@ -37,6 +37,3 @@ parameter.
37
37
 
38
38
  # Modify the schema.
39
39
  employees.configure(schema=my_schema)
40
-
41
- # Remove the schema.
42
- employees.configure(schema={})
@@ -18,7 +18,7 @@ keywords = ["arangodb", "python", "driver"]
18
18
  readme = "README.md"
19
19
  dynamic = ["version"]
20
20
  license = { file = "LICENSE" }
21
- requires-python = ">=3.9"
21
+ requires-python = ">=3.10"
22
22
 
23
23
  classifiers = [
24
24
  "Intended Audience :: Developers",
@@ -38,18 +38,19 @@ dependencies = [
38
38
  "urllib3>=1.26.0",
39
39
  "requests",
40
40
  "requests_toolbelt",
41
- "PyJWT",
42
- "setuptools>=42",
43
- "importlib_metadata>=4.7.1",
41
+ "PyJWT>=2.10.0",
44
42
  "packaging>=23.1",
45
43
  ]
46
44
 
45
+ [tool.setuptools.dynamic]
46
+ version = { attr = "arango.version.__version__" }
47
+
47
48
  [project.optional-dependencies]
48
49
  dev = [
49
- "black>=22.3.0",
50
- "flake8>=4.0.1",
51
- "isort>=5.10.1",
52
- "mypy>=0.942",
50
+ "black==26.1.0",
51
+ "flake8==7.3.0",
52
+ "isort==5.10.1",
53
+ "mypy==1.15.0",
53
54
  "mock",
54
55
  "pre-commit>=2.17.0",
55
56
  "pytest>=7.1.1",
@@ -89,5 +90,6 @@ profile = "black"
89
90
  [tool.mypy]
90
91
  warn_return_any = true
91
92
  warn_unused_configs = true
93
+ warn_unused_ignores = false
92
94
  ignore_missing_imports = true
93
95
  strict = true
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-arango
3
- Version: 8.2.5
3
+ Version: 8.3.0
4
4
  Summary: Python Driver for ArangoDB
5
5
  Author-email: Joohwan Oh <joohwan.oh@outlook.com>
6
6
  Maintainer-email: Joohwan Oh <joohwan.oh@outlook.com>, Alexandru Petenchea <alex.petenchea@gmail.com>, Anthony Mahanna <anthony.mahanna@arangodb.com>
@@ -39,21 +39,19 @@ Classifier: Programming Language :: Python :: 3.11
39
39
  Classifier: Programming Language :: Python :: 3.12
40
40
  Classifier: Topic :: Documentation :: Sphinx
41
41
  Classifier: Typing :: Typed
42
- Requires-Python: >=3.9
42
+ Requires-Python: >=3.10
43
43
  Description-Content-Type: text/markdown
44
44
  License-File: LICENSE
45
45
  Requires-Dist: urllib3>=1.26.0
46
46
  Requires-Dist: requests
47
47
  Requires-Dist: requests_toolbelt
48
- Requires-Dist: PyJWT
49
- Requires-Dist: setuptools>=42
50
- Requires-Dist: importlib_metadata>=4.7.1
48
+ Requires-Dist: PyJWT>=2.10.0
51
49
  Requires-Dist: packaging>=23.1
52
50
  Provides-Extra: dev
53
- Requires-Dist: black>=22.3.0; extra == "dev"
54
- Requires-Dist: flake8>=4.0.1; extra == "dev"
55
- Requires-Dist: isort>=5.10.1; extra == "dev"
56
- Requires-Dist: mypy>=0.942; extra == "dev"
51
+ Requires-Dist: black==26.1.0; extra == "dev"
52
+ Requires-Dist: flake8==7.3.0; extra == "dev"
53
+ Requires-Dist: isort==5.10.1; extra == "dev"
54
+ Requires-Dist: mypy==1.15.0; extra == "dev"
57
55
  Requires-Dist: mock; extra == "dev"
58
56
  Requires-Dist: pre-commit>=2.17.0; extra == "dev"
59
57
  Requires-Dist: pytest>=7.1.1; extra == "dev"
@@ -40,6 +40,7 @@ arango/response.py
40
40
  arango/result.py
41
41
  arango/typings.py
42
42
  arango/utils.py
43
+ arango/version.py
43
44
  arango/wal.py
44
45
  docs/Makefile
45
46
  docs/admin.rst
@@ -1,16 +1,14 @@
1
1
  urllib3>=1.26.0
2
2
  requests
3
3
  requests_toolbelt
4
- PyJWT
5
- setuptools>=42
6
- importlib_metadata>=4.7.1
4
+ PyJWT>=2.10.0
7
5
  packaging>=23.1
8
6
 
9
7
  [dev]
10
- black>=22.3.0
11
- flake8>=4.0.1
12
- isort>=5.10.1
13
- mypy>=0.942
8
+ black==26.1.0
9
+ flake8==7.3.0
10
+ isort==5.10.1
11
+ mypy==1.15.0
14
12
  mock
15
13
  pre-commit>=2.17.0
16
14
  pytest>=7.1.1
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes