12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- """Tools for creating `messages
15
+ """**DEPRECATED** Tools for creating `messages
16
16
<http://www.mongodb.org/display/DOCS/Mongo+Wire+Protocol>`_ to be sent to
17
17
MongoDB.
18
18
19
19
.. note:: This module is for internal use and is generally not needed by
20
20
application developers.
21
+
22
+ .. versionchanged:: 3.12
23
+ This module is deprecated and will be removed in PyMongo 4.0.
21
24
"""
22
25
23
26
import datetime
@@ -595,7 +598,11 @@ def _insert_uncompressed(collection_name, docs, check_keys,
595
598
596
599
def insert (collection_name , docs , check_keys ,
597
600
safe , last_error_args , continue_on_error , opts , ctx = None ):
598
- """Get an **insert** message."""
601
+ """**DEPRECATED** Get an **insert** message.
602
+
603
+ .. versionchanged:: 3.12
604
+ This function is deprecated and will be removed in PyMongo 4.0.
605
+ """
599
606
if ctx :
600
607
return _insert_compressed (
601
608
collection_name , docs , check_keys , continue_on_error , opts , ctx )
@@ -645,7 +652,11 @@ def _update_uncompressed(collection_name, upsert, multi, spec,
645
652
646
653
def update (collection_name , upsert , multi , spec ,
647
654
doc , safe , last_error_args , check_keys , opts , ctx = None ):
648
- """Get an **update** message."""
655
+ """**DEPRECATED** Get an **update** message.
656
+
657
+ .. versionchanged:: 3.12
658
+ This function is deprecated and will be removed in PyMongo 4.0.
659
+ """
649
660
if ctx :
650
661
return _update_compressed (
651
662
collection_name , upsert , multi , spec , doc , check_keys , opts , ctx )
@@ -788,7 +799,11 @@ def _query_uncompressed(options, collection_name, num_to_skip,
788
799
789
800
def query (options , collection_name , num_to_skip , num_to_return ,
790
801
query , field_selector , opts , check_keys = False , ctx = None ):
791
- """Get a **query** message."""
802
+ """**DEPRECATED** Get a **query** message.
803
+
804
+ .. versionchanged:: 3.12
805
+ This function is deprecated and will be removed in PyMongo 4.0.
806
+ """
792
807
if ctx :
793
808
return _query_compressed (options , collection_name , num_to_skip ,
794
809
num_to_return , query , field_selector ,
@@ -825,7 +840,11 @@ def _get_more_uncompressed(collection_name, num_to_return, cursor_id):
825
840
826
841
827
842
def get_more (collection_name , num_to_return , cursor_id , ctx = None ):
828
- """Get a **getMore** message."""
843
+ """**DEPRECATED** Get a **getMore** message.
844
+
845
+ .. versionchanged:: 3.12
846
+ This function is deprecated and will be removed in PyMongo 4.0.
847
+ """
829
848
if ctx :
830
849
return _get_more_compressed (
831
850
collection_name , num_to_return , cursor_id , ctx )
@@ -862,12 +881,15 @@ def _delete_uncompressed(
862
881
863
882
def delete (
864
883
collection_name , spec , safe , last_error_args , opts , flags = 0 , ctx = None ):
865
- """Get a **delete** message.
884
+ """**DEPRECATED** Get a **delete** message.
866
885
867
886
`opts` is a CodecOptions. `flags` is a bit vector that may contain
868
887
the SingleRemove flag or not:
869
888
870
889
http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire-protocol/#op-delete
890
+
891
+ .. versionchanged:: 3.12
892
+ This function is deprecated and will be removed in PyMongo 4.0.
871
893
"""
872
894
if ctx :
873
895
return _delete_compressed (collection_name , spec , opts , flags , ctx )
@@ -876,7 +898,10 @@ def delete(
876
898
877
899
878
900
def kill_cursors (cursor_ids ):
879
- """Get a **killCursors** message.
901
+ """**DEPRECATED** Get a **killCursors** message.
902
+
903
+ .. versionchanged:: 3.12
904
+ This function is deprecated and will be removed in PyMongo 4.0.
880
905
"""
881
906
num_cursors = len (cursor_ids )
882
907
pack = struct .Struct ("<ii" + ("q" * num_cursors )).pack
0 commit comments