Mongomock

Latest version: v4.1.2

Safety actively analyzes 624472 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 5

4.1.2

Full support (CI) of Python 3.10 and MongoDB v5.

* Add support for partialFilterExpression to create\_index (784)
* Handle $ in update operations when it is the last field. (787)
* Drop system collections on drop\_database calls. (788)
* Add support for "number" alias in $type (757)
* Allow system vars expressions to generate arrays (619)
* Handle $arrayElementAt applied to $filter
* $pushall $addToSet dollar operand support (786)
* Fix handling non existent fields and other errors in arithmetic operators and grouping. (502)
* Add support for allow\_disk\_use (780)
* Use class instead of function in patch (768)
* Make reading documents more thread safe. 694 (695)
* Patch gridfs without using isinstance. (761)
* Fix behavior for $type filter on arrays (756)
* Fix behavior for $type filter on numeric types (755)
* Make find(projection=...) return copies of the values (753)
* Add $not as a logic operator (716)
* Implement $map operator (738)
* Fix aggregation failing if index does not exists, added test (646)
* Sublist candidate handling update (676)
* Make distinct() work with arrays of dicts (751)
* Add let and array\_filters args for update\_ methods
* Create the list\_collections method on Database
* Keep a client's server info consistent
* Get the server info from an env var
* Keep the server\_info value in sync with the CI

4.0.0

This release mainly brings support for `pymongo` v4. It is still compatible with `pymongo` v3 and despite the major version, in most cases it should be an easy upgrade.

Breaking Changes
* Drop support for Python 2
* If no `pymongo` is installed at runtime, uses `pymongo` v4 interface

3.23.0

* Add default and options to get_default_database() (693)
* Bump the version of hacking, setting our flake8 config
* Support read\_concern in database.get\_collection() (708)
* Support $toLong operator (705)
* Fix for {$size: 1} queries on non-existent fields (711)
* Parse \`index\` of $arrayElemAt. Fix 607 (701)
* Implement the $let operator. (698)
* Implement the $expr operator. (538)
* Fix some bad indenting
* Fail properly on computing the $size of a missing array. (697)
* Fix SyntaxWarning about using "is not" with literals
* Add support for mergeObjects operator (689)
* fix: use group operators in addFields (690)

3.22.1

* Fix type stubs for patch and test it to prevent regressions
* Fix missing fields management in the graphLookup stage
* Allow dot'ted field in connectFrom of $graphLookup aggregation pipeline (686)

3.22.0

* Mark $convert and $toLong operators as not implemented yet
* Handle negative limit values for cursor
* Add filter kwarg to list\_collection\_names (681)
* Align equality and hashable capacity on Pymongo's object
* Really run tests for Python 3.9
* Add typing stubs
* Add the collation property to Cursor
* Add Python 3.9 to the test matrix
* Accept collation kwarg in update\_one and update\_many
* Performance improvement: create only one instance of \_Filterer (674)
* Implement '$concatArrays' aggregation pipeline operator (672)

3.21.0

* Return the right document for find\_one\_and\_replace using ReturnDocument.AFTER and upsert
* Implement basic codec\_options (670)
* Add $trim and $dateFromSTring to the unimplemented operators
* Stop using obsolete methods in unit tests as much as possible
* Implement boolean operators (663)
* Implement TTL Indexes (660)
* Fix pylint after v2.6.0 release
* Introduce Docker to ease local development (659)
* Implement the $regexMatch operator. (658)
* Implement the $split operator (661)
* Upgrade to MongoDB v4.4
* Create a framework to silence some NotImplementedError. (656)
* Raise an error when trying to create the same index with different options
* Raise a TypeError when creating an index with a wrong param
* Fix $elemMatch querying on values directly
* Fix $pull update operation when using $in for a nested field
* Accept snapshot or other keyword arguments for find, although raise an OperationFailure if it's not falsy
* Mark the start\_session method of MongoClient as not implemented
* Fix tz awareness for count\_documents and $match in aggregate
* Fix a test that was assuming to be run on UTC clock. (652)

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.