diff --git a/pymongo/asynchronous/collection.py b/pymongo/asynchronous/collection.py index 127136dd4..4fff6650f 100644 --- a/pymongo/asynchronous/collection.py +++ b/pymongo/asynchronous/collection.py @@ -251,7 +251,6 @@ class AsyncCollection(common.BaseObject, Generic[_DocumentType]): unicode_decode_error_handler="replace", document_class=dict ) self._timeout = database.client.options.timeout - self._retry_policy = database.client._retry_policy if create or kwargs: if _IS_SYNC: diff --git a/pymongo/asynchronous/database.py b/pymongo/asynchronous/database.py index 2c482f041..28ed36073 100644 --- a/pymongo/asynchronous/database.py +++ b/pymongo/asynchronous/database.py @@ -135,7 +135,6 @@ class AsyncDatabase(common.BaseObject, Generic[_DocumentType]): self._name = name self._client: AsyncMongoClient[_DocumentType] = client self._timeout = client.options.timeout - self._retry_policy = client._retry_policy @property def client(self) -> AsyncMongoClient[_DocumentType]: diff --git a/pymongo/synchronous/collection.py b/pymongo/synchronous/collection.py index 34fd7190d..1057151e5 100644 --- a/pymongo/synchronous/collection.py +++ b/pymongo/synchronous/collection.py @@ -254,7 +254,6 @@ class Collection(common.BaseObject, Generic[_DocumentType]): unicode_decode_error_handler="replace", document_class=dict ) self._timeout = database.client.options.timeout - self._retry_policy = database.client._retry_policy if create or kwargs: if _IS_SYNC: diff --git a/pymongo/synchronous/database.py b/pymongo/synchronous/database.py index cc041a2e3..1956795bc 100644 --- a/pymongo/synchronous/database.py +++ b/pymongo/synchronous/database.py @@ -135,7 +135,6 @@ class Database(common.BaseObject, Generic[_DocumentType]): self._name = name self._client: MongoClient[_DocumentType] = client self._timeout = client.options.timeout - self._retry_policy = client._retry_policy @property def client(self) -> MongoClient[_DocumentType]: diff --git a/test/asynchronous/test_client_backpressure.py b/test/asynchronous/test_client_backpressure.py index 2b85f3f0d..3e75ed9b0 100644 --- a/test/asynchronous/test_client_backpressure.py +++ b/test/asynchronous/test_client_backpressure.py @@ -37,7 +37,7 @@ from pymongo.errors import OperationFailure, PyMongoError _IS_SYNC = False -# Mock an system overload error. +# Mock a system overload error. mock_overload_error = { "configureFailPoint": "failCommand", "mode": {"times": 1}, diff --git a/test/test_client_backpressure.py b/test/test_client_backpressure.py index 63351a3a1..61334a121 100644 --- a/test/test_client_backpressure.py +++ b/test/test_client_backpressure.py @@ -37,7 +37,7 @@ from pymongo.errors import OperationFailure, PyMongoError _IS_SYNC = True -# Mock an system overload error. +# Mock a system overload error. mock_overload_error = { "configureFailPoint": "failCommand", "mode": {"times": 1},