cursor_manager – Managers to handle when cursors are killed after being closed

DEPRECATED - A manager to handle when cursors are killed after they are closed.

New cursor managers should be defined as subclasses of CursorManager and can be installed on a client by calling set_cursor_manager().

Changed in version 3.3: Deprecated, for real this time.

Changed in version 3.0: Undeprecated. close() now requires an address argument. The BatchCursorManager class is removed.

class pymongo.cursor_manager.CursorManager(client)

Instantiate the manager.

  • client: a MongoClient
close(cursor_id, address)

Kill a cursor.

Raises TypeError if cursor_id is not an instance of (int, long).

  • cursor_id: cursor id to close
  • address: the cursor’s server’s (host, port) pair

Changed in version 3.0: Now requires an address argument.