web3 7.14.0__py3-none-any.whl → 7.14.1__py3-none-any.whl

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.
ens/specs/.DS_Store ADDED
Binary file
@@ -50,9 +50,11 @@ class HTTPSessionManager:
50
50
  self,
51
51
  cache_size: int = 100,
52
52
  session_pool_max_workers: int = 5,
53
+ explicit_session: Optional[requests.Session] = None,
53
54
  ) -> None:
54
55
  self.session_cache = SimpleCache(cache_size)
55
56
  self.session_pool = ThreadPoolExecutor(max_workers=session_pool_max_workers)
57
+ self._explicit_session = explicit_session
56
58
 
57
59
  @staticmethod
58
60
  def get_default_http_endpoint() -> URI:
@@ -64,6 +66,11 @@ class HTTPSessionManager:
64
66
  session: requests.Session = None,
65
67
  request_timeout: Optional[float] = None,
66
68
  ) -> requests.Session:
69
+ # If an explicit session was provided at init time, always use it
70
+ # regardless of which thread is making the request
71
+ if self._explicit_session is not None:
72
+ return self._explicit_session
73
+
67
74
  # cache key should have a unique thread identifier
68
75
  cache_key = generate_cache_key(f"{threading.get_ident()}:{endpoint_uri}")
69
76
 
@@ -89,7 +89,7 @@ class AsyncBeacon:
89
89
  ) -> Dict[str, Any]:
90
90
  uri = URI(self.base_url + endpoint_uri)
91
91
  return await self._request_session_manager.async_json_make_post_request(
92
- uri, json=body, timeout=self.request_timeout
92
+ uri, json=body, timeout=ClientTimeout(self.request_timeout)
93
93
  )
94
94
 
95
95
  # [ BEACON endpoints ]
web3/providers/rpc/rpc.py CHANGED
@@ -72,7 +72,9 @@ class HTTPProvider(JSONBaseProvider):
72
72
  **kwargs: Any,
73
73
  ) -> None:
74
74
  super().__init__(**kwargs)
75
- self._request_session_manager = HTTPSessionManager()
75
+ # Pass explicit session to manager so it's used for ALL requests,
76
+ # regardless of which thread makes them
77
+ self._request_session_manager = HTTPSessionManager(explicit_session=session)
76
78
 
77
79
  if endpoint_uri is None:
78
80
  self.endpoint_uri = (
@@ -84,11 +86,6 @@ class HTTPProvider(JSONBaseProvider):
84
86
  self._request_kwargs = request_kwargs or {}
85
87
  self._exception_retry_configuration = exception_retry_configuration
86
88
 
87
- if session:
88
- self._request_session_manager.cache_and_return_session(
89
- self.endpoint_uri, session
90
- )
91
-
92
89
  def __str__(self) -> str:
93
90
  return f"RPC connection {self.endpoint_uri}"
94
91
 
web3/types.py CHANGED
@@ -156,7 +156,7 @@ class SetCodeAuthorizationParams(TypedDict):
156
156
  chainId: int
157
157
  address: Union[Address, ChecksumAddress, str]
158
158
  nonce: Nonce
159
- y_parity: int
159
+ yParity: int
160
160
  r: int
161
161
  s: int
162
162
 
@@ -193,7 +193,7 @@ TxParams = TypedDict(
193
193
 
194
194
  class WithdrawalData(TypedDict):
195
195
  index: int
196
- validator_index: int
196
+ validatorIndex: int
197
197
  address: ChecksumAddress
198
198
  amount: Gwei
199
199
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: web3
3
- Version: 7.14.0
3
+ Version: 7.14.1
4
4
  Summary: web3: A Python library for interacting with Ethereum
5
5
  Home-page: https://github.com/ethereum/web3.py
6
6
  Author: The Ethereum Foundation
@@ -37,7 +37,7 @@ Requires-Dist: websockets<16.0.0,>=10.0.0
37
37
  Requires-Dist: pyunormalize>=15.0.0
38
38
  Provides-Extra: tester
39
39
  Requires-Dist: eth-tester[py-evm]<0.14.0b1,>=0.13.0b1; extra == "tester"
40
- Requires-Dist: py-geth>=5.1.0; extra == "tester"
40
+ Requires-Dist: py-geth>=6.4.0; extra == "tester"
41
41
  Provides-Extra: dev
42
42
  Requires-Dist: build>=0.9.0; extra == "dev"
43
43
  Requires-Dist: bump_my_version>=0.19.0; extra == "dev"
@@ -60,7 +60,7 @@ Requires-Dist: tox>=4.0.0; extra == "dev"
60
60
  Requires-Dist: mypy==1.10.0; extra == "dev"
61
61
  Requires-Dist: pre-commit>=3.4.0; extra == "dev"
62
62
  Requires-Dist: eth-tester[py-evm]<0.14.0b1,>=0.13.0b1; extra == "dev"
63
- Requires-Dist: py-geth>=5.1.0; extra == "dev"
63
+ Requires-Dist: py-geth>=6.4.0; extra == "dev"
64
64
  Provides-Extra: docs
65
65
  Requires-Dist: sphinx>=6.0.0; extra == "docs"
66
66
  Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "docs"
@@ -77,7 +77,7 @@ Requires-Dist: tox>=4.0.0; extra == "test"
77
77
  Requires-Dist: mypy==1.10.0; extra == "test"
78
78
  Requires-Dist: pre-commit>=3.4.0; extra == "test"
79
79
  Requires-Dist: eth-tester[py-evm]<0.14.0b1,>=0.13.0b1; extra == "test"
80
- Requires-Dist: py-geth>=5.1.0; extra == "test"
80
+ Requires-Dist: py-geth>=6.4.0; extra == "test"
81
81
  Dynamic: author
82
82
  Dynamic: author-email
83
83
  Dynamic: classifier
@@ -9,6 +9,7 @@ ens/contract_data.py,sha256=CZa7Uxzq6rT-KonwHHM_wo-5ry0j1DMbikgEaP27Uy8,148602
9
9
  ens/ens.py,sha256=-avaYLLwUAPj8cYxP5fcH5h9aVabG5xuvBkwh5yTbMQ,21722
10
10
  ens/exceptions.py,sha256=5h-t3G-lwYchYe4JgHaxD_a_llh56sS6qzo9Rpa0S0o,2442
11
11
  ens/utils.py,sha256=DYPCrIFJPrnWNa-d3-oX2YlKXlLM9dQz43XzVoS4k5I,9354
12
+ ens/specs/.DS_Store,sha256=1lFlJ5EFymdzGAUAaI30vcaaLHt3F1LwpG7xILf9jsM,6148
12
13
  ens/specs/nf.json,sha256=tPXKzdhgu9gqNi0UhKC1kzPqSBgy4yHm5TL19RQHBqU,49038
13
14
  ens/specs/normalization_spec.json,sha256=8mmjBj4OoYCn7pD4P7hqKP_qy6rpYzpyRinSH3CCP9M,3171499
14
15
  web3/__init__.py,sha256=P11QAEV_GYoZq9ij8gDzFx5tKzJY2aMXG-keg2Lg1xs,1277
@@ -25,7 +26,7 @@ web3/net.py,sha256=Y3vPzHWVFkfHEZoJxjDOt4tp5ERmZrMuyi4ZFOLmIeA,1562
25
26
  web3/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
27
  web3/testing.py,sha256=Ury_-7XSstJ8bkCfdGEi4Cr76QzSfW7v_zfPlDlLJj0,923
27
28
  web3/tracing.py,sha256=ZcOam7t-uEZXyui6Cndv6RYeCZP5jh1TBn2hG8sv17Q,3098
28
- web3/types.py,sha256=-BDNWxVkTT6veJoN0XcDAKYjAIZiy7gWdpIezvNqm-8,15459
29
+ web3/types.py,sha256=uC29RfzPBuqwwCNPI91Un-8i7eDesTj_sEV96AzMtUY,15457
29
30
  web3/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
31
  web3/_utils/abi.py,sha256=pa3AYPmVRbWpC3wVRczD30UVBobs-aFUwCLLAaGlq7E,27574
31
32
  web3/_utils/abi_element_identifiers.py,sha256=m305lsvUZk-jkPixT0IJd9P5sXqMvmwlwlLeBgEAnBQ,55
@@ -45,7 +46,7 @@ web3/_utils/fee_utils.py,sha256=MFt27R9E3qFP-Hf87-Lzv0JAiuYRE_qqafyTmzctAYA,2145
45
46
  web3/_utils/filters.py,sha256=_LxE-LbuhElTUfW-_fV1tqfdWHxS6a_RyoInD2m6nN0,12243
46
47
  web3/_utils/formatters.py,sha256=ld6hUnt4awpbZ6-AoOCDrGM6wgup_e-8G4FxEa3SytM,3719
47
48
  web3/_utils/http.py,sha256=2R3UOeZmwiQGc3ladf78R9AnufbGaTXAntqf-ZQlZPI,230
48
- web3/_utils/http_session_manager.py,sha256=hlp3NlT-e9liAxO-5HnH4ZdLrtXadsreJvqapRBLdpY,12680
49
+ web3/_utils/http_session_manager.py,sha256=DOYjCeICRa6C33zKYvfsPf9LjprKjHgB6CPIXWUi7z0,13014
49
50
  web3/_utils/hypothesis.py,sha256=4Cm4iOWv-uP9irg_Pv63kYNDYUAGhnUH6fOPWRw3A0g,209
50
51
  web3/_utils/math.py,sha256=4oU5YdbQBXElxK00CxmUZ94ApXFu9QT_TrO0Kho1HTs,1083
51
52
  web3/_utils/method_formatters.py,sha256=HI44SfDbg3mhIYJ9JujlsrLDHnhrv-ZVQdTte1gaTxE,41496
@@ -102,7 +103,7 @@ web3/auto/__init__.py,sha256=ZbzAiCZMdt_tCTTPvH6t8NCVNroKKkt7TSVBBNR74Is,44
102
103
  web3/auto/gethdev.py,sha256=MuWD2gxv0xDv_SzPsp9mSkS1oG4P54xFK83qw9NvswA,438
103
104
  web3/beacon/__init__.py,sha256=Ac6YiNgU8D8Ynnh5RwSCx2NwPyjnpFjpXeHuSssFbaU,113
104
105
  web3/beacon/api_endpoints.py,sha256=rkoy4d6igjgHbI0HSE9FEdZSYw94KhPz1gGaPdEjMCg,2632
105
- web3/beacon/async_beacon.py,sha256=CWchRZANN57174sWz90177eMz0kfQPROQlBLGWNxqs8,9763
106
+ web3/beacon/async_beacon.py,sha256=JXv0Y_nUTFVbAEgIEEBvZsEZ6JvD2_bDWtjwZaJYlko,9778
106
107
  web3/beacon/beacon.py,sha256=awL60kk7syulb2tuwkOFnkS1eki_tZxAk4p34LGPGho,8707
107
108
  web3/contract/__init__.py,sha256=qeZRtTw9xriwoD82w6vePDuPBZ35-CMVdkzViBSH3Qs,293
108
109
  web3/contract/async_contract.py,sha256=1B9FZKoVJLMc4Ih7wh5kGiHdMbNOWby1qub4GnvpYfo,20599
@@ -150,7 +151,7 @@ web3/providers/persistent/utils.py,sha256=U7Yu30h4FtU0JfJnFfyNleZJxmNoejQCuU6MeM
150
151
  web3/providers/persistent/websocket.py,sha256=STf31VNdwidMeAeeL1r5f8v3l66xChKkxZpnZzUiYO8,4577
151
152
  web3/providers/rpc/__init__.py,sha256=mObsuwjr7xyHnnRlwzsmbp2JgZdn2NXSSctvpye4AuQ,149
152
153
  web3/providers/rpc/async_rpc.py,sha256=S3Dd1gvAJSouYsZg7K-r_uS4BO0YsAPY1wD_3NJng4w,6345
153
- web3/providers/rpc/rpc.py,sha256=a46-TpdGgQj6KhePHO7fQJGwEGHnF-5--RswFkODu18,6105
154
+ web3/providers/rpc/rpc.py,sha256=Vf_T7oXQWYhxhVjkK0caOdEd3E9vnB5kxvW7MAnKhbg,6105
154
155
  web3/providers/rpc/utils.py,sha256=_mtoZMMIoZpPA8J8U5DfRxaNQmi8bw0ZVUiqn1Nz4co,2154
155
156
  web3/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
156
157
  web3/scripts/install_pre_releases.py,sha256=uVxsZk239640yxiqlPhfXxZKSsh3858pURKppi9kM5U,821
@@ -164,8 +165,8 @@ web3/utils/async_exception_handling.py,sha256=OoKbLNwWcY9dxLCbOfxcQPSB1OxWraNqcw
164
165
  web3/utils/caching.py,sha256=miulUjLOjlOfTux8HWBklpRIa6_fVNTVFHIWcbZt27o,2591
165
166
  web3/utils/exception_handling.py,sha256=n-MtO5LNzJDVzHTzO6olzfb2_qEVtVRvink0ixswg-Y,2917
166
167
  web3/utils/subscriptions.py,sha256=ElRi5Vxae1DI2T75KR28DJ7ALe69aZbzfohJXV2W9w4,9371
167
- web3-7.14.0.dist-info/licenses/LICENSE,sha256=ENGC4gSn0kYaC_mlaXOEwCKmA6W7Z9MeSemc5O2k-h0,1095
168
- web3-7.14.0.dist-info/METADATA,sha256=y6vx8R3F0hatblIMEWeD4h50fLKIFrUVviSaoGV_7Mo,5621
169
- web3-7.14.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
170
- web3-7.14.0.dist-info/top_level.txt,sha256=iwupuJh7wgypXrpk_awszyri3TahRr5vxSphNyvt1bU,9
171
- web3-7.14.0.dist-info/RECORD,,
168
+ web3-7.14.1.dist-info/licenses/LICENSE,sha256=ENGC4gSn0kYaC_mlaXOEwCKmA6W7Z9MeSemc5O2k-h0,1095
169
+ web3-7.14.1.dist-info/METADATA,sha256=JpZeSs_knmZkrwd7K17kdPxCBDY4rja3_rzxzJa0VQs,5621
170
+ web3-7.14.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
171
+ web3-7.14.1.dist-info/top_level.txt,sha256=iwupuJh7wgypXrpk_awszyri3TahRr5vxSphNyvt1bU,9
172
+ web3-7.14.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5