I have the connection defaulted to w=0 but for collection.update_one or collection.update_many, I want to set the write_concern per operation by setting the parameter w=0. Instead I'm getting this error:
update_one() got an unexpected keyword argument 'w'
What is the right way to do this? I saw that insert accepts 'w' but not update_one or update_many. Why?
The new way to override a PyMongo client's, database's, or collection's write concern is using "with_options":
See the docs for write concern and with_options