Changes in 0.18.0
- Drop support for EOL'd MongoDB v2.6, v3.0, and v3.2.
- MongoEngine now requires PyMongo >= v3.4. Travis CI now tests against MongoDB v3.4 – v3.6 and PyMongo v3.4 – v3.6 (#2017 #2066).
- Improve performance by avoiding a call to to_mongo in Document.save() #2049
- Connection/disconnection improvements:
- Expose mongoengine.connection.disconnect and mongoengine.connection.disconnect_all
- Fix disconnecting #566 (closed) #1599 #605 #607 #1213 #565 (closed)
- Improve documentation of connect/disconnect
- Fix issue when using multiple connections to the same mongo with different credentials #2047
- connect fails immediately when db name contains invalid characters #2031 #1718
- Fix the default write concern of Document.save that was overwriting the connection write concern #568
- Fix querying on List(EmbeddedDocument) subclasses fields #1961 #1492
- Fix querying on (Generic)EmbeddedDocument subclasses fields #475
- Fix QuerySet.aggregate so that it takes limit and skip value into account #2029
- Generate unique indices for SortedListField and EmbeddedDocumentListFields #2020
- BREAKING CHANGE: Changed the behavior of a custom field validator (i.e validation parameter of a Field). It is now expected to raise a ValidationError instead of returning True/False #2050
- BREAKING CHANGES (associated with connect/disconnect fixes):
- Calling connect 2 times with the same alias and different parameter will raise an error (should call disconnect first).
- disconnect now clears mongoengine.connection._connection_settings.
- disconnect now clears the cached attribute Document._collection.
- BREAKING CHANGE: EmbeddedDocument.save & .reload is no longier exist #1552
Из интересного: Improve performance by avoiding a call to to_mongo in Document.save() #2049