Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Motor 0.3.3 Released

DZone's Guide to

Motor 0.3.3 Released

· Java Zone
Free Resource

Download Microservices for Java Developers: A hands-on introduction to frameworks and containers. Brought to you in partnership with Red Hat.

Motor

Today I released version 0.3.3 of Motor, the asynchronous MongoDB driver for Python and Tornado. This release is compatible with MongoDB 2.2, 2.4, and 2.6. It requires PyMongo 2.7.1.

This release fixes an occasional infinite loop and memory leak. The bug was triggered when you passed a callback to MotorCursor.each, and Motor had to open a new socket in the process of executing your callback, and your callback raised an exception:

from tornado.ioloop import IOLoop
import motor

loop = IOLoop.instance()

def each(result, error):
    raise Exception()

collection = motor.MotorClient().test.test
cursor = collection.find().each(callback=each)
loop.start()

The bug has been present since Motor 0.2. I am indebted to Eugene Protozanov for an excellent bug report.

Get the latest version with pip install --upgrade motor. The documentation is on ReadTheDocs. View the changelog here. If you encounter any issues, please file them in Jira.

Download Modern Java EE Design Patterns: Building Scalable Architecture for Sustainable Enterprise Development.  Brought to you in partnership with Red Hat

Topics:

Published at DZone with permission of A. Jesse Jiryu Davis, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}