Conversation
d1a7a21 to
3d54315
Compare
44a4020 to
3daf679
Compare
|
After moving to PyMongo 3.x encoded native UUIDs into a BSON Binary subtype 3 object. There's a transition under foot to the new subtype 4 object, in which some of the non-python clients that write UUIDs with varying byte orders will be standardized on the python client format. Callers will need to explicitly pass a encoding options as PYTHON_LEGACY moving forward to ensure compatibility with all clients. PyMongo plans to use the STANDARD uuid representation in a future breaking change. |
|
After the PYTHON_LEGACY updates: |
|
PyMongo 4.x doesn't export We're now left with the following: |
cfa0deb to
39a801f
Compare
|
https://pymongo.readthedocs.io/en/stable/migrate-to-pymongo4.html#collection-update-is-removed |
67217c2 to
3bc7f03
Compare
wojcikstefan
left a comment
There was a problem hiding this comment.
This is getting close!
I'd suggest still moving the most obvious and logically separate changes into their own PRs and merging / deploying them separately. This reduces the risk of each change and increases our ability to quickly identify what caused a potential issue. Slow is smooth and smooth is fast :)
e73f408 to
8fd3f25
Compare
PyMongo `~=4.0` removes `Cursor.count` and `Collection.count` and provides two new count methods: `Collection.count_documents` and `Collection.estimated_document_count`. Both `Cursor.count` and `Collection.count` in PyMongo `~=3.0` use `count` MongoDB command, which provide potentially inaccurate results when executd without a query predicate, in a transaction, or on a sharded cluster. `Collection.count_documents` issues an aggregate query, which is accurate in all cases, but relatively expensive. `Collection.estimated_document_count` in PyMongo `>=4.0,<4.2` uses a $collStats aggregation to estimate the document count for the collection. In PyMongo `>4.2` it relies on the `count` MongoDB command. When possible, we now try using the estimated document count for count operations, but if a limit or skip is defined, or a hint is provided, we'll use the more accurate count. This mirrors the behavior of the upstream mongoengine implementation.
8fd3f25 to
27badf2
Compare
Bumps PyMongo from
3.12.3to4.2and addresses accompanying failures