PyMongo Changelog

What's new in PyMongo 2.7

Apr 4, 2014
  • Full support for MongoDB 2.6
  • A new bulk write operations API
  • Support for server side query timeouts using max_time_ms()
  • Support for writing aggregate() output to a collection
  • A new parallel_scan() helper
  • OperationFailure and its subclasses now include a details attribute with complete error details from the server
  • A new GridFS find() method that returns a GridOutCursor
  • Greatly improved support for mod_wsgi when using PyMongo’s C extensions. Read Jesse’s blog post for details
  • Improved C extension support for ARM little endian
  • Version 2.7 drops support for replica sets running MongoDB versions older than 1.6.2.

New in PyMongo 2.6.3 (Nov 2, 2013)

  • Fixes issues reported since the release of 2.6.2, most importantly a semaphore leak when a connection to the server fails

New in PyMongo 2.0 (Aug 6, 2011)

  • Important New Features:
  • PyMongo now performs automatic per-socket database authentication. You no longer have to re-authenticate for each new thread or after a replica set failover. Authentication credentials are cached by the driver until the application calls logout().
  • slave_okay can be set independently at the connection, database, collection or query level. Each level will inherit the slave_okay setting from the previous level and each level can override the previous level’s setting.
  • safe and getLastError options (e.g. w, wtimeout, etc.) can be set independently at the connection, database, collection or query level. Each level will inherit settings from the previous level and each level can override the previous level’s setting.
  • PyMongo now supports the await_data and partial cursor flags. If the await_data flag is set on a tailable cursor the server will block for some extra time waiting for more data to return. The partial flag tells a mongos to return partial data for a query if not all shards are available.
  • map_reduce() will accept a dict or instance of SON as the out parameter.
  • The URI parser has been moved into its own module and can be used directly by application code.
  • AutoReconnect exception now provides information about the error that actually occured instead of a generic failure message.
  • A number of new helper methods have been added with options for setting and unsetting cursor flags, re-indexing a collection, fsync and locking a server, and getting the server’s current operations.
  • API changes:
  • If only one host:port pair is specified Connection will make a direct connection to only that host. Please note that slave_okay must be True in order to query from a secondary.
  • If more than one host:port pair is specified or the replicaset option is used PyMongo will treat the specified host:port pair(s) as a seed list and connect using replica set behavior.