Files
mongo/pyproject.toml
T
dsql 30f0e44097 fix: correct wrong success predicates in upsert_document_field and create_documents
upsert_document_field returned False for an idempotent no-op upsert on an
existing document (modified_count=0, upserted_id=None) even though the doc
matched the requested state; switch to matched_count like its update_document_field
and update_document_operator siblings.

create_documents returned 0 on a partial insert_many failure, discarding the
BulkWriteError's nInserted count and inviting callers to retry the whole batch
on a wrongly-reported failure, duplicating documents that had already landed.
Catch BulkWriteError specifically and return e.details['nInserted'].

Bump to v0.1.7.

Signed-off-by: disqualifier <dev@disqualifier.me>
2026-07-02 17:22:31 -04:00

17 lines
334 B
TOML

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "mongo"
version = "0.1.7"
description = "async mongodb wrapper over motor with a raw escape hatch"
requires-python = ">=3.10"
dependencies = [
"motor>=3.0",
"pymongo>=4.0",
]
[tool.hatch.build.targets.wheel]
packages = ["src/mongo"]