Motor versions 2.0, 1.3.0, and 1.2.4

13 views
Skip to first unread message

A. Jesse Jiryu Davis

unread,
Jul 11, 2018, 8:00:25 AM7/11/18
to mongodb-...@googlegroups.com, mongod...@googlegroups.com
To support multi-document transactions, I had to make breaking changes to Motor's session API and release a major version bump, Motor 2.0. Since this is a major release I also deleted many helper methods and APIs that had been deprecated over time since Motor 1.0, most notably the old CRUD methods insert, update, remove, and save, and the original callback-based API. Read the Motor 2.0 Migration Guide carefully to upgrade your existing Motor application. Motor 2.0 also includes a Python 3.7 compatibility fix in the MotorChangeStream class returned by MotorCollection.watch.

Motor 2.0's changes have a big impact for some applications, so I created a bridge release that raises DeprecationWarning for all the APIs that are deleted in Motor 2.0, especially the callback API, which hasn't been deprecated before. Those DeprecationWarnings plus the Python 3.7 compatibility fix constitute Motor 1.3.0.

For applications that only need Python 3.7 compatibility, I've created Motor 1.2.4, which includes the Python 3.7 fix and no other changes.

Detailed release notes follow.

Motor 2.0

Motor 2.0 drops support for MongoDB 2.6 and adds supports MongoDB 4.0 features, including multi-document transactions, and change stream notifications on entire databases or entire MongoDB servers. This version of Motor requires PyMongo 3.7 or later.

Added support for aiohttp 3.0 and later, and dropped older aiohttp versions. The aiohttp integration now requires Python 3.5+.

This is a major release that removes previously deprecated APIs.

The MotorDatabase.add_user and MotorDatabase.remove_user methods are deleted. Manage user accounts with four database commands: createUser, usersInfo, updateUser, and dropUser. You can run any database command with the MotorDatabase.command() method.

The deprecated GridFS classes MotorGridFS and AsyncIOMotorGridFS are deleted in favor of MotorGridFSBucket and AsyncIOMotorGridFSBucket, which conform to driver specs for GridFS.

Additional changes:

Motor 1.3.0

Deprecate Motor’s old callback-based async API in preparation for removing it in Motor 2.0. Raise DeprecationWarning whenever a callback is passed.

See the Motor 2.0 Migration Guide.

Motor 1.2.4

Fix a Python 3.7 compatibility bug in the MotorChangeStream class returned by MotorCollection.watch(). It is now possible to use change streams in async for loops in Python 3.7.



A. Jesse Jiryu Davis

unread,
Jul 11, 2018, 2:33:54 PM7/11/18
to mongodb-...@googlegroups.com, mongod...@googlegroups.com
There was an additional Python 3.7 compatibility fix that I'd forgotten to backport. I've now released Motor 1.3.1 and Motor 1.2.5, which are fully Python 3.7-compatible. Thanks to Roman Bulgakov for reporting the mistake.
Reply all
Reply to author
Forward
0 new messages