kover 3.2.0__tar.gz → 3.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.
Files changed (92) hide show
  1. {kover-3.2.0 → kover-3.2.1}/PKG-INFO +17 -32
  2. {kover-3.2.0 → kover-3.2.1}/README.md +14 -29
  3. {kover-3.2.0 → kover-3.2.1}/docs/architecture.md +1 -1
  4. {kover-3.2.0 → kover-3.2.1}/docs/documents.md +1 -1
  5. {kover-3.2.0 → kover-3.2.1}/kover/__version__.py +1 -1
  6. {kover-3.2.0 → kover-3.2.1}/kover/bootstrap.py +1 -1
  7. {kover-3.2.0 → kover-3.2.1}/kover/collection.py +1 -1
  8. {kover-3.2.0 → kover-3.2.1}/kover/cursor.py +1 -1
  9. {kover-3.2.0 → kover-3.2.1}/kover/gridfs/gridfs.py +1 -1
  10. {kover-3.2.0 → kover-3.2.1}/kover/gridfs/models.py +1 -1
  11. {kover-3.2.0 → kover-3.2.1}/kover/models/replica_set.py +1 -1
  12. {kover-3.2.0 → kover-3.2.1}/kover/models/user.py +1 -1
  13. {kover-3.2.0 → kover-3.2.1}/kover/network/auth/scram.py +1 -1
  14. {kover-3.2.0 → kover-3.2.1}/kover/network/connection.py +1 -1
  15. {kover-3.2.0 → kover-3.2.1}/kover/network/factory.py +1 -1
  16. {kover-3.2.0 → kover-3.2.1}/kover/network/wire/codec.py +3 -3
  17. {kover-3.2.0 → kover-3.2.1}/kover/schema/document.py +1 -1
  18. {kover-3.2.0 → kover-3.2.1}/kover/schema/generator.py +3 -3
  19. {kover-3.2.0 → kover-3.2.1}/kover/session.py +1 -1
  20. {kover-3.2.0 → kover-3.2.1}/pyproject.toml +2 -11
  21. {kover-3.2.0 → kover-3.2.1}/.gitignore +0 -0
  22. {kover-3.2.0 → kover-3.2.1}/CODE_OF_CONDUCT.md +0 -0
  23. {kover-3.2.0 → kover-3.2.1}/LICENSE +0 -0
  24. {kover-3.2.0 → kover-3.2.1}/docs/connections.md +0 -0
  25. {kover-3.2.0 → kover-3.2.1}/docs/development.md +0 -0
  26. {kover-3.2.0 → kover-3.2.1}/docs/read_preferences.md +0 -0
  27. {kover-3.2.0 → kover-3.2.1}/docs/transactions.md +0 -0
  28. {kover-3.2.0 → kover-3.2.1}/kover/__init__.py +0 -0
  29. {kover-3.2.0 → kover-3.2.1}/kover/_utils/__init__.py +0 -0
  30. {kover-3.2.0 → kover-3.2.1}/kover/_utils/mappings.py +0 -0
  31. {kover-3.2.0 → kover-3.2.1}/kover/_utils/protocols.py +0 -0
  32. {kover-3.2.0 → kover-3.2.1}/kover/_utils/representation.py +0 -0
  33. {kover-3.2.0 → kover-3.2.1}/kover/bulk_write_builder.py +0 -0
  34. {kover-3.2.0 → kover-3.2.1}/kover/client.py +0 -0
  35. {kover-3.2.0 → kover-3.2.1}/kover/configuration/__init__.py +0 -0
  36. {kover-3.2.0 → kover-3.2.1}/kover/configuration/environment.py +0 -0
  37. {kover-3.2.0 → kover-3.2.1}/kover/database.py +0 -0
  38. {kover-3.2.0 → kover-3.2.1}/kover/error_codes.py +0 -0
  39. {kover-3.2.0 → kover-3.2.1}/kover/exceptions.py +0 -0
  40. {kover-3.2.0 → kover-3.2.1}/kover/execution/__init__.py +0 -0
  41. {kover-3.2.0 → kover-3.2.1}/kover/execution/context.py +0 -0
  42. {kover-3.2.0 → kover-3.2.1}/kover/execution/executor.py +0 -0
  43. {kover-3.2.0 → kover-3.2.1}/kover/execution/preparation.py +0 -0
  44. {kover-3.2.0 → kover-3.2.1}/kover/execution/protocols.py +0 -0
  45. {kover-3.2.0 → kover-3.2.1}/kover/execution/router.py +0 -0
  46. {kover-3.2.0 → kover-3.2.1}/kover/gridfs/__init__.py +0 -0
  47. {kover-3.2.0 → kover-3.2.1}/kover/gridfs/annotations.py +0 -0
  48. {kover-3.2.0 → kover-3.2.1}/kover/gridfs/exceptions.py +0 -0
  49. {kover-3.2.0 → kover-3.2.1}/kover/models/__init__.py +0 -0
  50. {kover-3.2.0 → kover-3.2.1}/kover/models/address.py +0 -0
  51. {kover-3.2.0 → kover-3.2.1}/kover/models/collation.py +0 -0
  52. {kover-3.2.0 → kover-3.2.1}/kover/models/collection.py +0 -0
  53. {kover-3.2.0 → kover-3.2.1}/kover/models/concerns.py +0 -0
  54. {kover-3.2.0 → kover-3.2.1}/kover/models/credentials.py +0 -0
  55. {kover-3.2.0 → kover-3.2.1}/kover/models/hello.py +0 -0
  56. {kover-3.2.0 → kover-3.2.1}/kover/models/indexes.py +0 -0
  57. {kover-3.2.0 → kover-3.2.1}/kover/models/operations.py +0 -0
  58. {kover-3.2.0 → kover-3.2.1}/kover/models/options.py +0 -0
  59. {kover-3.2.0 → kover-3.2.1}/kover/models/parsed_uri.py +0 -0
  60. {kover-3.2.0 → kover-3.2.1}/kover/models/read_preference.py +0 -0
  61. {kover-3.2.0 → kover-3.2.1}/kover/models/server.py +0 -0
  62. {kover-3.2.0 → kover-3.2.1}/kover/models/topology.py +0 -0
  63. {kover-3.2.0 → kover-3.2.1}/kover/models/tx_state.py +0 -0
  64. {kover-3.2.0 → kover-3.2.1}/kover/network/__init__.py +0 -0
  65. {kover-3.2.0 → kover-3.2.1}/kover/network/auth/__init__.py +0 -0
  66. {kover-3.2.0 → kover-3.2.1}/kover/network/auth/authenticator.py +0 -0
  67. {kover-3.2.0 → kover-3.2.1}/kover/network/lease.py +0 -0
  68. {kover-3.2.0 → kover-3.2.1}/kover/network/pool.py +0 -0
  69. {kover-3.2.0 → kover-3.2.1}/kover/network/probe.py +0 -0
  70. {kover-3.2.0 → kover-3.2.1}/kover/network/registry.py +0 -0
  71. {kover-3.2.0 → kover-3.2.1}/kover/network/transport.py +0 -0
  72. {kover-3.2.0 → kover-3.2.1}/kover/network/uri_parser/__init__.py +0 -0
  73. {kover-3.2.0 → kover-3.2.1}/kover/network/uri_parser/hosts.py +0 -0
  74. {kover-3.2.0 → kover-3.2.1}/kover/network/uri_parser/srv.py +0 -0
  75. {kover-3.2.0 → kover-3.2.1}/kover/network/uri_parser/uri.py +0 -0
  76. {kover-3.2.0 → kover-3.2.1}/kover/network/uri_parser/uri_options.py +0 -0
  77. {kover-3.2.0 → kover-3.2.1}/kover/network/wire/__init__.py +0 -0
  78. {kover-3.2.0 → kover-3.2.1}/kover/network/wire/compression.py +0 -0
  79. {kover-3.2.0 → kover-3.2.1}/kover/network/wire/error_codes.py +0 -0
  80. {kover-3.2.0 → kover-3.2.1}/kover/network/wire/error_mapper.py +0 -0
  81. {kover-3.2.0 → kover-3.2.1}/kover/network/wire/handshake.py +0 -0
  82. {kover-3.2.0 → kover-3.2.1}/kover/policies/__init__.py +0 -0
  83. {kover-3.2.0 → kover-3.2.1}/kover/policies/commands.py +0 -0
  84. {kover-3.2.0 → kover-3.2.1}/kover/policies/routing.py +0 -0
  85. {kover-3.2.0 → kover-3.2.1}/kover/py.typed +0 -0
  86. {kover-3.2.0 → kover-3.2.1}/kover/schema/__init__.py +0 -0
  87. {kover-3.2.0 → kover-3.2.1}/kover/schema/_pipeline.py +0 -0
  88. {kover-3.2.0 → kover-3.2.1}/kover/topology/__init__.py +0 -0
  89. {kover-3.2.0 → kover-3.2.1}/kover/topology/discovery.py +0 -0
  90. {kover-3.2.0 → kover-3.2.1}/kover/topology/protocols.py +0 -0
  91. {kover-3.2.0 → kover-3.2.1}/kover/topology/selector.py +0 -0
  92. {kover-3.2.0 → kover-3.2.1}/kover/topology/state.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: kover
3
- Version: 3.2.0
3
+ Version: 3.2.1
4
4
  Summary: A fully asynchronous, strongly typed MongoDB driver for Python.
5
5
  Project-URL: Homepage, https://github.com/megawattka/kover
6
6
  Project-URL: Repository, https://github.com/megawattka/kover
@@ -9,7 +9,7 @@ Project-URL: Changelog, https://github.com/megawattka/kover/releases
9
9
  Author-email: megawattka <gunter56741@gmail.com>
10
10
  License-Expression: MIT
11
11
  License-File: LICENSE
12
- Keywords: async,asyncio,bson,database,driver,mongodb,odm,pymongo
12
+ Keywords: async,asyncio,database,driver,mongodb,odm,pymongo
13
13
  Classifier: Development Status :: 4 - Beta
14
14
  Classifier: Framework :: AsyncIO
15
15
  Classifier: Framework :: Pydantic :: 2
@@ -23,8 +23,8 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
23
  Classifier: Topic :: Software Development :: Quality Assurance
24
24
  Classifier: Typing :: Typed
25
25
  Requires-Python: >=3.12
26
- Requires-Dist: bson>=0.4.0
27
26
  Requires-Dist: dnspython>=2.7.0
27
+ Requires-Dist: elune>=0.5.0
28
28
  Requires-Dist: pydantic>=2.14.3
29
29
  Requires-Dist: typing-extensions>=4.16.0
30
30
  Provides-Extra: snappy
@@ -78,31 +78,17 @@ Runtime dependencies:
78
78
 
79
79
  | Dependency | Minimum version |
80
80
  | --- | --- |
81
- | `bson` | `0.4.0` |
81
+ | `elune` | `0.5.0` |
82
82
  | `dnspython` | `2.7.0` |
83
83
  | `pydantic` | `2.14.3` |
84
84
  | `typing-extensions` | `4.16.0` |
85
85
 
86
- Kover uses the BSON implementation from **https://python.wattka.dev/**,
87
- including its native Pydantic integration. Do not install PyMongo alongside
88
- it: both provide the `bson` import namespace.
86
+ Kover uses [Elune](https://github.com/megawattka/elune) for BSON serialization,
87
+ including its native Pydantic integration.
89
88
 
90
89
  ## Installation
91
90
 
92
- The repository configures BSON's source explicitly in `pyproject.toml`:
93
-
94
- ```toml
95
- [tool.uv.sources]
96
- bson = { index = "bson" }
97
-
98
- [[tool.uv.index]]
99
- name = "bson"
100
- url = "https://python.wattka.dev/"
101
- explicit = true
102
- ```
103
-
104
- For a separate application using uv, include the same BSON source/index mapping
105
- in its `pyproject.toml`, then add Kover:
91
+ Install Kover using uv:
106
92
 
107
93
  ```bash
108
94
  uv add kover
@@ -110,8 +96,7 @@ uv add kover
110
96
  uv add "kover[snappy,zstd]"
111
97
  ```
112
98
 
113
- `zlib` compression needs no extra dependency. The explicit index is used only
114
- for packages mapped to it, rather than as a general package source.
99
+ `zlib` compression needs no extra dependency.
115
100
 
116
101
  ## Quick start
117
102
 
@@ -281,7 +266,7 @@ Native UUIDs require an explicit BSON representation. Use this client for the
281
266
  `User` schema and CRUD examples below:
282
267
 
283
268
  ```python
284
- from bson import CodecOptions, UuidRepresentation
269
+ from elune import CodecOptions, UuidRepresentation
285
270
 
286
271
  from kover import from_uri
287
272
 
@@ -306,7 +291,7 @@ UUIDs as binary subtype 4 and decodes them back to `UUID`. The default
306
291
  | `Model.model_mongodb_schema()` | Generate a `{"$jsonSchema": ...}` validator |
307
292
 
308
293
  ```python
309
- from bson import ObjectId
294
+ from elune import ObjectId
310
295
 
311
296
  user = User(username="alice", age=27)
312
297
  assert user.object_id is None
@@ -324,9 +309,9 @@ automatically converted to camelCase: declare aliases explicitly, as with
324
309
  `externalId` above.
325
310
  See [documents and serialization](docs/documents.md) for details.
326
311
 
327
- Use Python-mode dumps for BSON, not `model_dump(mode="json")`. BSON's native
328
- Pydantic integration preserves BSON instances in Python mode. Kover does not
329
- globally patch BSON classes or `uuid.UUID`.
312
+ Use Python-mode dumps for BSON, not `model_dump(mode="json")`. Elune's native
313
+ Pydantic integration preserves BSON instances in Python mode.
314
+ Kover does not globally patch Elune's classes or `uuid.UUID`.
330
315
 
331
316
  ### Decimal values
332
317
 
@@ -335,10 +320,10 @@ produces a `decimal` schema, but `model_dump()` retains the Python `Decimal`;
335
320
  it needs a codec or explicit conversion for BSON encoding.
336
321
 
337
322
  For domain models using `Decimal`, prefer the `DecimalCodec` example in the
338
- [BSON README](https://github.com/megawattka/bson#custom-codecs) over manual
323
+ [Elune README](https://github.com/megawattka/elune#custom-codecs) over manual
339
324
  conversion or model serializers. Define that codec in your application and
340
325
  register it with `CodecOptions(type_registry=TypeRegistry([DecimalCodec()]))`
341
- (`CodecOptions` and `TypeRegistry` are imported from `bson.codec_options`).
326
+ (`CodecOptions` and `TypeRegistry` are imported from `elune.codec_options`).
342
327
  Pass these options as `codec_options=` to `from_uri()` or `make_client()`;
343
328
  if you also use UUIDs, include their representation in the same options.
344
329
  The codec converts `Decimal` to BSON `Decimal128` on writes and back to
@@ -346,12 +331,12 @@ The codec converts `Decimal` to BSON `Decimal128` on writes and back to
346
331
  fit the precision and range of Decimal128. `DecimalCodec` is an example to
347
332
  define, not a built-in class to import.
348
333
 
349
- Alternatively, use `bson.Decimal128` directly for stored values:
334
+ Alternatively, use `elune.Decimal128` directly for stored values:
350
335
 
351
336
  ```python
352
337
  from decimal import Decimal
353
338
 
354
- from bson import Decimal128
339
+ from elune import Decimal128
355
340
 
356
341
  from kover import Document
357
342
 
@@ -43,31 +43,17 @@ Runtime dependencies:
43
43
 
44
44
  | Dependency | Minimum version |
45
45
  | --- | --- |
46
- | `bson` | `0.4.0` |
46
+ | `elune` | `0.5.0` |
47
47
  | `dnspython` | `2.7.0` |
48
48
  | `pydantic` | `2.14.3` |
49
49
  | `typing-extensions` | `4.16.0` |
50
50
 
51
- Kover uses the BSON implementation from **https://python.wattka.dev/**,
52
- including its native Pydantic integration. Do not install PyMongo alongside
53
- it: both provide the `bson` import namespace.
51
+ Kover uses [Elune](https://github.com/megawattka/elune) for BSON serialization,
52
+ including its native Pydantic integration.
54
53
 
55
54
  ## Installation
56
55
 
57
- The repository configures BSON's source explicitly in `pyproject.toml`:
58
-
59
- ```toml
60
- [tool.uv.sources]
61
- bson = { index = "bson" }
62
-
63
- [[tool.uv.index]]
64
- name = "bson"
65
- url = "https://python.wattka.dev/"
66
- explicit = true
67
- ```
68
-
69
- For a separate application using uv, include the same BSON source/index mapping
70
- in its `pyproject.toml`, then add Kover:
56
+ Install Kover using uv:
71
57
 
72
58
  ```bash
73
59
  uv add kover
@@ -75,8 +61,7 @@ uv add kover
75
61
  uv add "kover[snappy,zstd]"
76
62
  ```
77
63
 
78
- `zlib` compression needs no extra dependency. The explicit index is used only
79
- for packages mapped to it, rather than as a general package source.
64
+ `zlib` compression needs no extra dependency.
80
65
 
81
66
  ## Quick start
82
67
 
@@ -246,7 +231,7 @@ Native UUIDs require an explicit BSON representation. Use this client for the
246
231
  `User` schema and CRUD examples below:
247
232
 
248
233
  ```python
249
- from bson import CodecOptions, UuidRepresentation
234
+ from elune import CodecOptions, UuidRepresentation
250
235
 
251
236
  from kover import from_uri
252
237
 
@@ -271,7 +256,7 @@ UUIDs as binary subtype 4 and decodes them back to `UUID`. The default
271
256
  | `Model.model_mongodb_schema()` | Generate a `{"$jsonSchema": ...}` validator |
272
257
 
273
258
  ```python
274
- from bson import ObjectId
259
+ from elune import ObjectId
275
260
 
276
261
  user = User(username="alice", age=27)
277
262
  assert user.object_id is None
@@ -289,9 +274,9 @@ automatically converted to camelCase: declare aliases explicitly, as with
289
274
  `externalId` above.
290
275
  See [documents and serialization](docs/documents.md) for details.
291
276
 
292
- Use Python-mode dumps for BSON, not `model_dump(mode="json")`. BSON's native
293
- Pydantic integration preserves BSON instances in Python mode. Kover does not
294
- globally patch BSON classes or `uuid.UUID`.
277
+ Use Python-mode dumps for BSON, not `model_dump(mode="json")`. Elune's native
278
+ Pydantic integration preserves BSON instances in Python mode.
279
+ Kover does not globally patch Elune's classes or `uuid.UUID`.
295
280
 
296
281
  ### Decimal values
297
282
 
@@ -300,10 +285,10 @@ produces a `decimal` schema, but `model_dump()` retains the Python `Decimal`;
300
285
  it needs a codec or explicit conversion for BSON encoding.
301
286
 
302
287
  For domain models using `Decimal`, prefer the `DecimalCodec` example in the
303
- [BSON README](https://github.com/megawattka/bson#custom-codecs) over manual
288
+ [Elune README](https://github.com/megawattka/elune#custom-codecs) over manual
304
289
  conversion or model serializers. Define that codec in your application and
305
290
  register it with `CodecOptions(type_registry=TypeRegistry([DecimalCodec()]))`
306
- (`CodecOptions` and `TypeRegistry` are imported from `bson.codec_options`).
291
+ (`CodecOptions` and `TypeRegistry` are imported from `elune.codec_options`).
307
292
  Pass these options as `codec_options=` to `from_uri()` or `make_client()`;
308
293
  if you also use UUIDs, include their representation in the same options.
309
294
  The codec converts `Decimal` to BSON `Decimal128` on writes and back to
@@ -311,12 +296,12 @@ The codec converts `Decimal` to BSON `Decimal128` on writes and back to
311
296
  fit the precision and range of Decimal128. `DecimalCodec` is an example to
312
297
  define, not a built-in class to import.
313
298
 
314
- Alternatively, use `bson.Decimal128` directly for stored values:
299
+ Alternatively, use `elune.Decimal128` directly for stored values:
315
300
 
316
301
  ```python
317
302
  from decimal import Decimal
318
303
 
319
- from bson import Decimal128
304
+ from elune import Decimal128
320
305
 
321
306
  from kover import Document
322
307
 
@@ -1,7 +1,7 @@
1
1
  # Architecture
2
2
 
3
3
  Kover is a Python 3.12+ `asyncio` MongoDB driver. It uses asyncio streams for
4
- network I/O, Pydantic v2 for models, the BSON package for serialization, and
4
+ network I/O, Pydantic v2 for models, Elune for BSON serialization, and
5
5
  its own URI parser with asynchronous dnspython SRV/TXT discovery.
6
6
  Application commands are not delegated to a PyMongo client or a thread pool;
7
7
 
@@ -8,7 +8,7 @@ APIs for reading and writing documents.
8
8
  ## Fields, aliases, and IDs
9
9
 
10
10
  ```python
11
- from bson import ObjectId
11
+ from elune import ObjectId
12
12
  from pydantic import Field
13
13
 
14
14
  from kover import Document
@@ -1,6 +1,6 @@
1
1
  """Version information for kover."""
2
2
 
3
- __version__ = "3.2.0"
3
+ __version__ = "3.2.1"
4
4
  __author__ = "megawattka"
5
5
  __license__ = "MIT"
6
6
  __copyright__ = "Copyright (C) 2024-present megawattka"
@@ -21,7 +21,7 @@ if TYPE_CHECKING:
21
21
  import asyncio
22
22
  from collections.abc import Sequence
23
23
 
24
- from bson import CodecOptions
24
+ from elune import CodecOptions
25
25
 
26
26
  from .models.credentials import AuthCredentials
27
27
 
@@ -4,7 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  from typing import TYPE_CHECKING, Any, TypeVar, overload
6
6
 
7
- from bson import ObjectId
7
+ from elune import ObjectId
8
8
 
9
9
  from ._utils import classrepr, filter_non_null, maybe_to_dict, raw_decoder
10
10
  from .cursor import Cursor
@@ -5,7 +5,7 @@ from __future__ import annotations
5
5
  from collections import deque
6
6
  from typing import TYPE_CHECKING, Any, NoReturn, Self, cast
7
7
 
8
- from bson import Int64
8
+ from elune import Int64
9
9
 
10
10
  from ._utils.mappings import maybe_to_dict
11
11
  from .execution.context import CommandReply
@@ -9,7 +9,7 @@ import math
9
9
  from pathlib import Path
10
10
  from typing import TYPE_CHECKING, Any, Final, Self
11
11
 
12
- from bson import Binary, ObjectId
12
+ from elune import Binary, ObjectId
13
13
 
14
14
  from ..models import Delete, Index, IndexDirection
15
15
  from .exceptions import GridFSFileNotFound, IncorrectGridFSData
@@ -5,7 +5,7 @@ from __future__ import annotations
5
5
  import datetime as dt # ruff: ignore[typing-only-standard-library-import]
6
6
  from typing import Annotated
7
7
 
8
- from bson import Binary, ObjectId # ruff: ignore[typing-only-third-party-import]
8
+ from elune import Binary, ObjectId # ruff: ignore[typing-only-third-party-import]
9
9
  from pydantic import Field
10
10
 
11
11
  from ..schema.document import Document
@@ -4,7 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  from typing import Any
6
6
 
7
- from bson import ObjectId # ruff: ignore[typing-only-third-party-import]
7
+ from elune import ObjectId # ruff: ignore[typing-only-third-party-import]
8
8
  from pydantic import BaseModel, ConfigDict, Field
9
9
 
10
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  from typing import Any, Literal
4
4
 
5
- from bson import Binary # ruff: ignore[typing-only-third-party-import]
5
+ from elune import Binary # ruff: ignore[typing-only-third-party-import]
6
6
  from pydantic import BaseModel, Field
7
7
 
8
8
 
@@ -8,7 +8,7 @@ from hmac import HMAC, compare_digest
8
8
  import os
9
9
  from typing import TYPE_CHECKING, Any
10
10
 
11
- from bson import Binary
11
+ from elune import Binary
12
12
 
13
13
  if TYPE_CHECKING:
14
14
  from collections.abc import Awaitable, Callable
@@ -8,7 +8,7 @@ import struct
8
8
  from typing import TYPE_CHECKING, Any
9
9
  import zlib
10
10
 
11
- from bson.errors import InvalidBSON
11
+ from elune.errors import InvalidBSON
12
12
 
13
13
  from .._utils.mappings import get_hello_payload
14
14
  from ..exceptions import NetworkError, ProtocolError
@@ -11,7 +11,7 @@ from .wire.codec import CommandCodec
11
11
  from .wire.compression import ZLIB_COMPRESSOR_ID, get_context_by_id
12
12
 
13
13
  if TYPE_CHECKING:
14
- from bson import CodecOptions
14
+ from elune import CodecOptions
15
15
 
16
16
  from ..models.address import Address
17
17
  from ..models.credentials import AuthCredentials
@@ -5,15 +5,15 @@ from __future__ import annotations
5
5
  import struct
6
6
  from typing import TYPE_CHECKING, Any, Final
7
7
 
8
- from bson import decode, encode
9
- from bson.codec_options import DEFAULT_CODEC_OPTIONS
8
+ from elune import decode, encode
9
+ from elune.codec_options import DEFAULT_CODEC_OPTIONS
10
10
 
11
11
  from .compression import ZLIB_COMPRESSOR_ID, get_context_by_id
12
12
 
13
13
  if TYPE_CHECKING:
14
14
  from collections.abc import Mapping
15
15
 
16
- from bson.codec_options import CodecOptions
16
+ from elune.codec_options import CodecOptions
17
17
 
18
18
 
19
19
  OP_MSG: Final[int] = 2013
@@ -4,7 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  from typing import Any
6
6
 
7
- from bson import ObjectId # ruff: ignore[typing-only-third-party-import]
7
+ from elune import ObjectId # ruff: ignore[typing-only-third-party-import]
8
8
  from pydantic import (
9
9
  BaseModel,
10
10
  ConfigDict,
@@ -6,7 +6,7 @@ from collections.abc import Callable
6
6
  from functools import cached_property
7
7
  from typing import TYPE_CHECKING, Any, cast, override
8
8
 
9
- from bson import (
9
+ from elune import (
10
10
  Binary,
11
11
  Code,
12
12
  DatetimeMS,
@@ -42,7 +42,7 @@ if TYPE_CHECKING:
42
42
  def _core_contract(value: Any) -> Any: # ruff: ignore[any-type]
43
43
  """Compare native BSON core contracts, not ambiguous JSON wire shapes.
44
44
 
45
- BSON 0.4 creates fresh Rust validator closures on every schema request.
45
+ Elune creates fresh Rust validator closures on every schema request.
46
46
  Their names and the surrounding core schemas are stable; their identities
47
47
  are not. Metadata and refs belong to the use site, not the type contract.
48
48
 
@@ -72,7 +72,7 @@ def _core_contract(value: Any) -> Any: # ruff: ignore[any-type]
72
72
  class MongoDBSchemaGenerator(GenerateJsonSchema):
73
73
  """Generate strict MongoDB validators through copy-on-transform stages.
74
74
 
75
- Native BSON core schemas are adapted locally, leaving BSON's Pydantic
75
+ Native BSON core schemas are adapted locally, leaving Elune's Pydantic
76
76
  validation and serialization untouched. References are expanded before
77
77
  normalization, type mapping and compatibility checking. Unsupported
78
78
  constraints raise ``SchemaGenerationException`` instead of disappearing.
@@ -4,7 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  from typing import TYPE_CHECKING, Any
6
6
 
7
- from bson import Int64
7
+ from elune import Int64
8
8
 
9
9
  from .exceptions import OperationFailure
10
10
  from .models.tx_state import TxnState
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "kover"
7
- version = "3.2.0"
7
+ version = "3.2.1"
8
8
  description = "A fully asynchronous, strongly typed MongoDB driver for Python."
9
9
  readme = "README.md"
10
10
  authors = [{ name = "megawattka", email = "gunter56741@gmail.com" }]
@@ -18,7 +18,6 @@ keywords = [
18
18
  "database",
19
19
  "driver",
20
20
  "pymongo",
21
- "bson",
22
21
  "odm",
23
22
  ]
24
23
  classifiers = [
@@ -36,20 +35,12 @@ classifiers = [
36
35
  "Typing :: Typed",
37
36
  ]
38
37
  dependencies = [
39
- "bson>=0.4.0", # see below
38
+ "elune>=0.5.0",
40
39
  "dnspython>=2.7.0",
41
40
  "pydantic>=2.14.3",
42
41
  "typing-extensions>=4.16.0",
43
42
  ]
44
43
 
45
- [tool.uv.sources]
46
- bson = { index = "bson" }
47
-
48
- [[tool.uv.index]]
49
- url = "https://python.wattka.dev/"
50
- name = "bson"
51
- explicit = true
52
-
53
44
  [project.urls]
54
45
  Homepage = "https://github.com/megawattka/kover"
55
46
  Repository = "https://github.com/megawattka/kover"
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