Learn how to stop testing everything every sprint and only test the code you’ve changed. Brought to you by Parasoft.

A few days ago, Bernie Hackett and I shipped a release candidate for PyMongo 2.7, with substantial contributions from Amalia Hawkins and Kyle Erf. This version supports new features in the upcoming MongoDB 2.6, and includes major internal improvements in the driver code. We rarely make RCs before releases, but given the scope of changes it seems wise.

MongoDB 2.6 support

For the first time in years, the MongoDB wire protocol is changing. Bernie Hackett updated PyMongo to support the new protocol, while maintaining backwards compatibility with old servers. He also added support for MongoDB's new parallelCollectionScan command, which scans a whole collection with multiple cursors in parallel.

PyMongo collects the operations into a minimal set of messages to the server. Compared to the old style, bulk operations have lower network costs. You can use PyMongo's bulk API with any version of MongoDB, but you only get the network advantage when talking to MongoDB 2.6.

Improved C code

After great effort, I understand why our C extensions didn't like running in mod_wsgi. I wrote an explanation that's more detailed than you want to read. But even better, Bernie fixed our C code so mod_wsgi no longer slows it down or makes it log weird warnings. Finally, I put clear configuration instructions in the PyMongo docs.

Bernie fixed all remaining platform-specific C code. Now you can run PyMongo with its C extensions on ARM, for example if you talk to MongoDB from a Raspberry Pi.