File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ PyMongo 4.7 brings a number of improvements including:
43
43
creating vector search indexes in MongoDB Atlas.
44
44
- Fixed a bug where ``read_concern `` and ``write_concern `` were improperly added to
45
45
:meth: `~pymongo.collection.Collection.list_search_indexes ` queries.
46
-
46
+ - Deprecated :attr: `pymongo.write_concern.WriteConcern.wtimeout ` and :attr: `pymongo.mongo_client.MongoClient.wTimeoutMS `.
47
+ Use :meth: `~pymongo.timeout ` instead.
47
48
48
49
Unavoidable breaking changes
49
50
............................
Original file line number Diff line number Diff line change @@ -439,8 +439,8 @@ def __init__(
439
439
primary (e.g. w=3 means write to the primary and wait until
440
440
replicated to **two** secondaries). Passing w=0 **disables write
441
441
acknowledgement** and all other write concern options.
442
- - `wTimeoutMS`: (integer) Used in conjunction with `w`. Specify a value
443
- in milliseconds to control how long to wait for write propagation
442
+ - `wTimeoutMS`: **DEPRECATED** (integer) Used in conjunction with `w`.
443
+ Specify a value in milliseconds to control how long to wait for write propagation
444
444
to complete. If replication does not complete in the given
445
445
timeframe, a timeout exception is raised. Passing wTimeoutMS=0
446
446
will cause **write operations to wait indefinitely**.
@@ -717,6 +717,9 @@ def __init__(
717
717
Not::
718
718
719
719
client.__my_database__
720
+
721
+ .. versionchanged:: 4.7
722
+ Deprecated parameter ``wTimeoutMS``, use :meth:`~pymongo.timeout`.
720
723
"""
721
724
doc_class = document_class or dict
722
725
self .__init_kwargs : dict [str , Any ] = {
Original file line number Diff line number Diff line change @@ -38,9 +38,9 @@ class WriteConcern:
38
38
replicated to **two** secondaries). **w=0 disables acknowledgement
39
39
of write operations and can not be used with other write concern
40
40
options.**
41
- :param wtimeout: (integer) Used in conjunction with `w`. Specify a value
42
- in milliseconds to control how long to wait for write propagation
43
- to complete. If replication does not complete in the given
41
+ :param wtimeout: (integer) **DEPRECATED** Used in conjunction with `w`.
42
+ Specify a value in milliseconds to control how long to wait for write
43
+ propagation to complete. If replication does not complete in the given
44
44
timeframe, a timeout exception is raised.
45
45
:param j: If ``True`` block until write operations have been committed
46
46
to the journal. Cannot be used in combination with `fsync`. Write
@@ -51,6 +51,10 @@ class WriteConcern:
51
51
server is running with journaling, this acts the same as the `j`
52
52
option, blocking until write operations have been committed to the
53
53
journal. Cannot be used in combination with `j`.
54
+
55
+
56
+ .. versionchanged:: 4.7
57
+ Deprecated parameter ``wtimeout``, use :meth:`~pymongo.timeout`.
54
58
"""
55
59
56
60
__slots__ = ("__document" , "__acknowledged" , "__server_default" )
You can’t perform that action at this time.
0 commit comments