>>> from bson.raw_bson import RawBSONDocument
>>> from bson.codec_options import CodecOptions
>>> import pymongo
>>> client = pymongo.MongoClient()
>>> opts = CodecOptions(document_class=RawBSONDocument)
>>> collection = client.get_database('test', codec_options=opts).collection
>>> collection.update_one({'_id': 1}, {'$set': {'x': 1}})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/emptysquare/.virtualenvs/c-driver/lib/python2.7/site-packages/pymongo/collection.py", line 835, in update_one
bypass_doc_val=bypass_document_validation)
File "/Users/emptysquare/.virtualenvs/c-driver/lib/python2.7/site-packages/pymongo/collection.py", line 709, in _update
codec_options=self.codec_options).copy()
AttributeError: 'RawBSONDocument' object has no attribute 'copy'