heynemann / motorengine

Motorengine is a port of MongoEngine for Tornado.
http://motorengine.readthedocs.org
204 stars 67 forks source link

Updated motorengine for newest version of pymongo, motor and tested with python3.6 and mongodb3.6 #128

Closed thekie closed 6 years ago

thekie commented 6 years ago

Hello, I needed the support for mongodb 3.6 but the former version of pymongo wasn't able to handle it. So I started the update train, and updated pymongo and motor to the newest version. This lead to some fixes in motorengine, which are part of this pull request.

I also added some more tests to increase the coverage.

UPDATE I added a tz parameter to the DateTimeField to enable non naive datetime objects to be set with auto insert and auto update. And also ensuring a certain timezone for all set values onwards. If a datetime with a different timezone is set, it will converted to the on initialization defined timezone.

All the single steps are elaborated in the commit messages.

Thanks for this great package. Cheers

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.9%) to 95.655% when pulling 800b9a8129f7e43e038f435bdf6c5f56496dc7f8 on danielkiedrowski:master into 81513dfd3546d301f65c057c4f14375e31eb97f3 on heynemann:master.

heynemann commented 6 years ago

Hey @danielkiedrowski thanks a lot for the contribution. Do you mind squashing to a single commit?