it works just fine with me in pymongo (3.0.3):
- probably you did not used SON when inserting the documents ?
- tip: you can specify SON as document_class in MongoClient as described here then all documents will be retrieved as SON objects
from bson import CodecOptions, SON
docson= SON([(j,i) for i,j in enumerate('abcdefghijklmnopqrstuvwxyz')])
docson
SON([('a', 0), ('b', 1), ('c', 2), ('d', 3), ('e', 4), ('f', 5), ('g', 6), ('h', 7), ('i', 8), ('j', 9), ('k', 10), ('l', 11), ('m', 12), ('n', 13), ('o', 14), ('p', 15), ('q', 16), ('r', 17), ('s', 18), ('t', 19), ('u', 20), ('v', 21), ('w', 22), ('x', 23), ('y', 24), ('z', 25)])
db.test.insert_one(docson)
opts = CodecOptions(document_class=SON)
colson = db.test.with_options(codec_options=opts)
colson.find_one({'a': 0})
SON([(u'_id', ObjectId('55c92bc2993000171429eff6')), (u'a', 0), (u'b', 1), (u'c', 2), (u'd', 3), (u'e', 4), (u'f', 5), (u'g', 6), (u'h', 7), (u'i', 8), (u'j', 9), (u'k', 10), (u'l', 11), (u'm', 12), (u'n', 13), (u'o', 14), (u'p', 15), (u'q', 16), (u'r', 17), (u's', 18), (u't', 19), (u'u', 20), (u'v', 21), (u'w', 22), (u'x', 23), (u'y', 24), (u'z', 25)])