1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- """Tools for creating `messages
15+ """**DEPRECATED** Tools for creating `messages
1616<http://www.mongodb.org/display/DOCS/Mongo+Wire+Protocol>`_ to be sent to
1717MongoDB.
1818
1919.. note:: This module is for internal use and is generally not needed by
2020 application developers.
21+
22+ .. versionchanged:: 3.12
23+ This module is deprecated and will be removed in PyMongo 4.0.
2124"""
2225
2326import datetime
@@ -595,7 +598,11 @@ def _insert_uncompressed(collection_name, docs, check_keys,
595598
596599def insert (collection_name , docs , check_keys ,
597600 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+ """
599606 if ctx :
600607 return _insert_compressed (
601608 collection_name , docs , check_keys , continue_on_error , opts , ctx )
@@ -645,7 +652,11 @@ def _update_uncompressed(collection_name, upsert, multi, spec,
645652
646653def update (collection_name , upsert , multi , spec ,
647654 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+ """
649660 if ctx :
650661 return _update_compressed (
651662 collection_name , upsert , multi , spec , doc , check_keys , opts , ctx )
@@ -788,7 +799,11 @@ def _query_uncompressed(options, collection_name, num_to_skip,
788799
789800def query (options , collection_name , num_to_skip , num_to_return ,
790801 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+ """
792807 if ctx :
793808 return _query_compressed (options , collection_name , num_to_skip ,
794809 num_to_return , query , field_selector ,
@@ -825,7 +840,11 @@ def _get_more_uncompressed(collection_name, num_to_return, cursor_id):
825840
826841
827842def 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+ """
829848 if ctx :
830849 return _get_more_compressed (
831850 collection_name , num_to_return , cursor_id , ctx )
@@ -862,12 +881,15 @@ def _delete_uncompressed(
862881
863882def delete (
864883 collection_name , spec , safe , last_error_args , opts , flags = 0 , ctx = None ):
865- """Get a **delete** message.
884+ """**DEPRECATED** Get a **delete** message.
866885
867886 `opts` is a CodecOptions. `flags` is a bit vector that may contain
868887 the SingleRemove flag or not:
869888
870889 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.
871893 """
872894 if ctx :
873895 return _delete_compressed (collection_name , spec , opts , flags , ctx )
@@ -876,7 +898,10 @@ def delete(
876898
877899
878900def 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.
880905 """
881906 num_cursors = len (cursor_ids )
882907 pack = struct .Struct ("<ii" + ("q" * num_cursors )).pack
0 commit comments