MongoClient.db.col.update({'_id':'A'}, {'$set':{'foo':'bar'}}, upsert=True)
v 2.7 returns:
{'updatedExisting': False, u'nModified': 0, u'ok': 1, u'upserted': [{u'index': 0, u'_id': u'a'}], u'n': 1}
pre 2.7 returns:
{u'syncMillis': 0, u'ok': 1.0, u'err': None, u'upserted': u'a', u'writtenTo': None, u'connectionId': 124, u'n': 1, u'updatedExisting': False}
Notice the 'upserted' used to be just the _id while now it is a list