web3-multi-provider 2.2.6__tar.gz → 2.2.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: web3-multi-provider
3
- Version: 2.2.6
3
+ Version: 2.2.7
4
4
  Summary: Web3py provider that makes it easy to switch between different blockchain nodes to make sure application will be be online if main blockchain node will be unavailable.
5
5
  License: MIT
6
6
  Author: Raman
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "web3-multi-provider"
3
- version = "2.2.6"
3
+ version = "2.2.7"
4
4
  description = "Web3py provider that makes it easy to switch between different blockchain nodes to make sure application will be be online if main blockchain node will be unavailable."
5
5
  authors = ["Raman <raman.s@lido.fi>"]
6
6
  license = "MIT License"
@@ -41,3 +41,7 @@ profile = "black"
41
41
 
42
42
  [tool.pytest.ini_options]
43
43
  asyncio_default_fixture_loop_scope = "function"
44
+ markers = [
45
+ "http_mock: configures mocked HTTP responses for tests",
46
+ "integration: marks tests that hit real RPC endpoints",
47
+ ]
@@ -56,6 +56,14 @@ class AsyncHTTPProviderProxy(AsyncHTTPProvider):
56
56
  self._network: str = "" # to pass fetching of the chain_id
57
57
  self._uri: str = normalize_provider(str(self.endpoint_uri))
58
58
  self._layer = layer
59
+ self._request_session_manager: HTTPSessionManagerProxy = (
60
+ HTTPSessionManagerProxy(
61
+ chain_id=self._chain_id,
62
+ uri=self._uri,
63
+ network=self._network,
64
+ layer=self._layer,
65
+ )
66
+ )
59
67
 
60
68
  async def _ensure_chain_info_initialized(self) -> None:
61
69
  """
@@ -66,7 +66,12 @@ class HTTPProviderProxy(HTTPProvider):
66
66
  self._chain_id: str = ""
67
67
  self._network: str = ""
68
68
  self._session: Optional[Any] = session
69
- self._request_session_manager: Optional[HTTPSessionManagerProxy] = None
69
+ self._request_session_manager = HTTPSessionManagerProxy(
70
+ chain_id=self._chain_id,
71
+ uri=self._uri,
72
+ network=self._network,
73
+ layer=self._layer,
74
+ )
70
75
 
71
76
  def _ensure_chain_info_initialized(self) -> None:
72
77
  """