-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.4, 3.5, 3.6
-
Component/s: None
-
None
-
Minor Change
Since PYTHON-1101 made the default write concern (WriteConcern()) evaluate to False it is not possible to override a write concern with the default.
>>> client = MongoClient(w="majority") >>> client.write_concern WriteConcern(w=majority) >>> client.get_database("test", write_concern=WriteConcern()).write_concern WriteConcern(w=majority) >>> WriteConcern() or WriteConcern(w='majority') WriteConcern(w=majority)
I propose we just remove the __bool__ and __nonzero__ methods as the behavior it causes is not intuitive. This would be a minor change in behavior that I bet no one externally relies on.
- is caused by
-
PYTHON-1101 Support sending writeConcern for commands that write
- Closed
- is depended on by
-
PYTHON-1557 Release PyMongo 3.7
- Closed