@@ -1205,35 +1205,47 @@ def options(self):
1205
1205
1206
1206
@property
1207
1207
def max_bson_size (self ):
1208
- """The largest BSON object the connected server accepts in bytes.
1208
+ """**DEPRECATED**: The largest BSON object the connected server accepts in bytes.
1209
1209
1210
1210
If the client is not connected, this will block until a connection is
1211
1211
established or raise ServerSelectionTimeoutError if no server is
1212
1212
available.
1213
+
1214
+ .. versionchanged:: 3.13
1215
+ Deprecated.
1213
1216
"""
1217
+ warnings .warn ("max_bson_size is Deprecated" , DeprecationWarning , stacklevel = 2 )
1214
1218
return self ._server_property ("max_bson_size" )
1215
1219
1216
1220
@property
1217
1221
def max_message_size (self ):
1218
- """The largest message the connected server accepts in bytes.
1222
+ """**DEPRECATED**: The largest message the connected server accepts in bytes.
1219
1223
1220
1224
If the client is not connected, this will block until a connection is
1221
1225
established or raise ServerSelectionTimeoutError if no server is
1222
1226
available.
1227
+
1228
+ .. versionchanged:: 3.13
1229
+ Deprecated.
1223
1230
"""
1231
+ warnings .warn ("max_message_size is Deprecated" , DeprecationWarning , stacklevel = 2 )
1224
1232
return self ._server_property ("max_message_size" )
1225
1233
1226
1234
@property
1227
1235
def max_write_batch_size (self ):
1228
- """The maxWriteBatchSize reported by the server.
1236
+ """**DEPRECATED**: The maxWriteBatchSize reported by the server.
1229
1237
1230
1238
If the client is not connected, this will block until a connection is
1231
1239
established or raise ServerSelectionTimeoutError if no server is
1232
1240
available.
1233
1241
1234
1242
Returns a default value when connected to server versions prior to
1235
1243
MongoDB 2.6.
1244
+
1245
+ .. versionchanged:: 3.13
1246
+ Deprecated.
1236
1247
"""
1248
+ warnings .warn ("max_write_batch_size is Deprecated" , DeprecationWarning , stacklevel = 2 )
1237
1249
return self ._server_property ("max_write_batch_size" )
1238
1250
1239
1251
@property
0 commit comments