From 7daad16762b009f112d3c6ca0cf43c09028ebd6f Mon Sep 17 00:00:00 2001 From: fselmo Date: Tue, 15 Oct 2024 15:48:30 -0600 Subject: [PATCH] No need to stub request counter for mocker; silences warnings. --- web3/_utils/module_testing/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web3/_utils/module_testing/utils.py b/web3/_utils/module_testing/utils.py index 4bce464e43..22a4408fdc 100644 --- a/web3/_utils/module_testing/utils.py +++ b/web3/_utils/module_testing/utils.py @@ -1,7 +1,6 @@ from asyncio import ( iscoroutinefunction, ) -import copy from typing import ( TYPE_CHECKING, Any, @@ -132,7 +131,7 @@ def _mock_request_handler( return self._make_request(method, params) request_id = ( - next(copy.deepcopy(self.w3.provider.request_counter)) + next(self.w3.provider.request_counter) if hasattr(self.w3.provider, "request_counter") else 1 ) @@ -201,7 +200,7 @@ async def _async_mock_request_handler( return await self._make_request(method, params) request_id = ( - next(copy.deepcopy(self.w3.provider.request_counter)) + next(self.w3.provider.request_counter) if hasattr(self.w3.provider, "request_counter") else 1 )