11import re
2- import warnings
32
43from bson .dbref import DBRef
54import pymongo
@@ -367,15 +366,6 @@ def save(
367366 meta['cascade'] = True. Also you can pass different kwargs to
368367 the cascade save using cascade_kwargs which overwrites the
369368 existing kwargs with custom values.
370- .. versionchanged:: 0.8.5
371- Optional save_condition that only overwrites existing documents
372- if the condition is satisfied in the current db record.
373- .. versionchanged:: 0.10
374- :class:`OperationError` exception raised if save_condition fails.
375- .. versionchanged:: 0.10.1
376- :class: save_condition failure now raises a `SaveConditionError`
377- .. versionchanged:: 0.10.7
378- Add signal_kwargs argument
379369 """
380370 signal_kwargs = signal_kwargs or {}
381371
@@ -630,9 +620,6 @@ def delete(self, signal_kwargs=None, **write_concern):
630620 For example, ``save(..., w: 2, fsync: True)`` will
631621 wait until at least two servers have recorded the write and
632622 will force an fsync on the primary server.
633-
634- .. versionchanged:: 0.10.7
635- Add signal_kwargs argument
636623 """
637624 signal_kwargs = signal_kwargs or {}
638625 signals .pre_delete .send (self .__class__ , document = self , ** signal_kwargs )
@@ -714,8 +701,6 @@ def switch_collection(self, collection_name, keep_created=True):
714701 def select_related (self , max_depth = 1 ):
715702 """Handles dereferencing of :class:`~bson.dbref.DBRef` objects to
716703 a maximum depth in order to cut down the number queries to mongodb.
717-
718- .. versionadded:: 0.5
719704 """
720705 DeReference = _import_class ("DeReference" )
721706 DeReference ()([self ], max_depth + 1 )
@@ -726,10 +711,6 @@ def reload(self, *fields, **kwargs):
726711
727712 :param fields: (optional) args list of fields to reload
728713 :param max_depth: (optional) depth of dereferencing to follow
729-
730- .. versionadded:: 0.1.2
731- .. versionchanged:: 0.6 Now chainable
732- .. versionchanged:: 0.9 Can provide specific fields to reload
733714 """
734715 max_depth = 1
735716 if fields and isinstance (fields [0 ], int ):
@@ -831,9 +812,6 @@ def drop_collection(cls):
831812
832813 Raises :class:`OperationError` if the document has no collection set
833814 (i.g. if it is `abstract`)
834-
835- .. versionchanged:: 0.10.7
836- :class:`OperationError` exception raised if no collection available
837815 """
838816 coll_name = cls ._get_collection_name ()
839817 if not coll_name :
@@ -1088,8 +1066,6 @@ class MapReduceDocument:
10881066 an ``ObjectId`` found in the given ``collection``,
10891067 the object can be accessed via the ``object`` property.
10901068 :param value: The result(s) for this key.
1091-
1092- .. versionadded:: 0.3
10931069 """
10941070
10951071 def __init__ (self , document , collection , key , value ):
0 commit comments