web3 7.0.0b3__tar.gz → 7.0.0b4__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.
Files changed (177) hide show
  1. {web3-7.0.0b3/web3.egg-info → web3-7.0.0b4}/PKG-INFO +13 -28
  2. {web3-7.0.0b3 → web3-7.0.0b4}/README.md +3 -3
  3. {web3-7.0.0b3 → web3-7.0.0b4}/ens/_normalization.py +1 -3
  4. {web3-7.0.0b3 → web3-7.0.0b4}/ens/async_ens.py +12 -9
  5. {web3-7.0.0b3 → web3-7.0.0b4}/ens/contract_data.py +2 -2
  6. {web3-7.0.0b3 → web3-7.0.0b4}/ens/ens.py +8 -5
  7. {web3-7.0.0b3 → web3-7.0.0b4}/ens/exceptions.py +19 -27
  8. {web3-7.0.0b3 → web3-7.0.0b4}/ens/specs/nf.json +1 -1
  9. {web3-7.0.0b3 → web3-7.0.0b4}/ens/specs/normalization_spec.json +1 -1
  10. {web3-7.0.0b3 → web3-7.0.0b4}/ens/utils.py +17 -10
  11. web3-7.0.0b4/pyproject.toml +127 -0
  12. {web3-7.0.0b3 → web3-7.0.0b4}/setup.py +10 -22
  13. {web3-7.0.0b3 → web3-7.0.0b4}/web3/__init__.py +2 -7
  14. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/abi.py +30 -29
  15. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/async_transactions.py +7 -4
  16. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/blocks.py +6 -2
  17. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/caching.py +7 -3
  18. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/compat/__init__.py +0 -3
  19. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/compile_contracts.py +1 -1
  20. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contracts.py +12 -12
  21. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/datatypes.py +5 -1
  22. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/decorators.py +6 -1
  23. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/empty.py +1 -1
  24. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/encoding.py +15 -10
  25. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/error_formatters_utils.py +5 -3
  26. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/events.py +20 -18
  27. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/fee_utils.py +2 -4
  28. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/filters.py +17 -12
  29. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/formatters.py +2 -2
  30. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/math.py +3 -2
  31. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/method_formatters.py +24 -5
  32. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/module.py +2 -1
  33. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/module_testing/eth_module.py +62 -69
  34. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/module_testing/go_ethereum_personal_module.py +1 -1
  35. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/module_testing/module_testing_utils.py +1 -3
  36. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/module_testing/utils.py +14 -7
  37. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/normalizers.py +3 -3
  38. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/request.py +4 -4
  39. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/rpc_abi.py +5 -1
  40. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/threads.py +8 -7
  41. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/transactions.py +14 -12
  42. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/type_conversion.py +5 -1
  43. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/validation.py +12 -10
  44. {web3-7.0.0b3 → web3-7.0.0b4}/web3/contract/async_contract.py +12 -7
  45. {web3-7.0.0b3 → web3-7.0.0b4}/web3/contract/base_contract.py +50 -56
  46. {web3-7.0.0b3 → web3-7.0.0b4}/web3/contract/contract.py +12 -6
  47. {web3-7.0.0b3 → web3-7.0.0b4}/web3/contract/utils.py +11 -6
  48. {web3-7.0.0b3 → web3-7.0.0b4}/web3/datastructures.py +22 -12
  49. {web3-7.0.0b3 → web3-7.0.0b4}/web3/eth/async_eth.py +33 -28
  50. {web3-7.0.0b3 → web3-7.0.0b4}/web3/eth/base_eth.py +7 -3
  51. {web3-7.0.0b3 → web3-7.0.0b4}/web3/eth/eth.py +18 -13
  52. {web3-7.0.0b3 → web3-7.0.0b4}/web3/exceptions.py +30 -59
  53. {web3-7.0.0b3 → web3-7.0.0b4}/web3/gas_strategies/time_based.py +2 -4
  54. {web3-7.0.0b3 → web3-7.0.0b4}/web3/geth.py +1 -3
  55. {web3-7.0.0b3 → web3-7.0.0b4}/web3/main.py +6 -2
  56. {web3-7.0.0b3 → web3-7.0.0b4}/web3/manager.py +7 -5
  57. {web3-7.0.0b3 → web3-7.0.0b4}/web3/method.py +13 -5
  58. {web3-7.0.0b3 → web3-7.0.0b4}/web3/middleware/base.py +4 -2
  59. {web3-7.0.0b3 → web3-7.0.0b4}/web3/middleware/filter.py +27 -17
  60. {web3-7.0.0b3 → web3-7.0.0b4}/web3/middleware/formatting.py +6 -3
  61. {web3-7.0.0b3 → web3-7.0.0b4}/web3/middleware/names.py +4 -1
  62. {web3-7.0.0b3 → web3-7.0.0b4}/web3/middleware/signing.py +6 -2
  63. {web3-7.0.0b3 → web3-7.0.0b4}/web3/middleware/stalecheck.py +2 -1
  64. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/eth_tester/defaults.py +1 -1
  65. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/eth_tester/main.py +5 -4
  66. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/eth_tester/middleware.py +10 -1
  67. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/ipc.py +7 -3
  68. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/persistent/async_ipc.py +6 -7
  69. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/persistent/persistent.py +11 -1
  70. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/persistent/request_processor.py +7 -7
  71. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/persistent/websocket.py +3 -3
  72. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/rpc/async_rpc.py +23 -6
  73. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/rpc/rpc.py +27 -16
  74. {web3-7.0.0b3 → web3-7.0.0b4}/web3/testing.py +4 -4
  75. {web3-7.0.0b3 → web3-7.0.0b4}/web3/tools/benchmark/main.py +13 -9
  76. {web3-7.0.0b3 → web3-7.0.0b4}/web3/tools/benchmark/utils.py +1 -1
  77. {web3-7.0.0b3 → web3-7.0.0b4}/web3/tracing.py +9 -5
  78. {web3-7.0.0b3 → web3-7.0.0b4}/web3/types.py +19 -22
  79. {web3-7.0.0b3 → web3-7.0.0b4/web3.egg-info}/PKG-INFO +13 -28
  80. {web3-7.0.0b3 → web3-7.0.0b4}/web3.egg-info/requires.txt +9 -27
  81. web3-7.0.0b3/pyproject.toml +0 -53
  82. {web3-7.0.0b3 → web3-7.0.0b4}/LICENSE +0 -0
  83. {web3-7.0.0b3 → web3-7.0.0b4}/MANIFEST.in +0 -0
  84. {web3-7.0.0b3 → web3-7.0.0b4}/ens/__init__.py +0 -0
  85. {web3-7.0.0b3 → web3-7.0.0b4}/ens/abis.py +0 -0
  86. {web3-7.0.0b3 → web3-7.0.0b4}/ens/auto.py +0 -0
  87. {web3-7.0.0b3 → web3-7.0.0b4}/ens/base_ens.py +0 -0
  88. {web3-7.0.0b3 → web3-7.0.0b4}/ens/constants.py +0 -0
  89. {web3-7.0.0b3 → web3-7.0.0b4}/setup.cfg +0 -0
  90. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/__init__.py +0 -0
  91. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/async_caching.py +0 -0
  92. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/__init__.py +0 -0
  93. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/__init__.py +0 -0
  94. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/_custom_contract_data.py +0 -0
  95. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/address_reflector.py +0 -0
  96. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/arrays_contract.py +0 -0
  97. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/bytes_contracts.py +0 -0
  98. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/constructor_contracts.py +0 -0
  99. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/contract_caller_tester.py +0 -0
  100. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/emitter_contract.py +0 -0
  101. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/event_contracts.py +0 -0
  102. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/extended_resolver.py +0 -0
  103. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/fallback_function_contract.py +0 -0
  104. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/function_name_tester_contract.py +0 -0
  105. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/math_contract.py +0 -0
  106. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/offchain_lookup.py +0 -0
  107. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/offchain_resolver.py +0 -0
  108. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/panic_errors_contract.py +0 -0
  109. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/payable_tester.py +0 -0
  110. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/receive_function_contracts.py +0 -0
  111. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/reflector_contracts.py +0 -0
  112. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/revert_contract.py +0 -0
  113. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/simple_resolver.py +0 -0
  114. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/storage_contract.py +0 -0
  115. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/string_contract.py +0 -0
  116. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/contract_sources/contract_data/tuple_contracts.py +0 -0
  117. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/ens.py +0 -0
  118. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/function_identifiers.py +0 -0
  119. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/http.py +0 -0
  120. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/hypothesis.py +0 -0
  121. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/module_testing/__init__.py +0 -0
  122. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/module_testing/go_ethereum_admin_module.py +0 -0
  123. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/module_testing/go_ethereum_txpool_module.py +0 -0
  124. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/module_testing/net_module.py +0 -0
  125. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/module_testing/persistent_connection_provider.py +0 -0
  126. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/module_testing/web3_module.py +0 -0
  127. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/utility_methods.py +0 -0
  128. {web3-7.0.0b3 → web3-7.0.0b4}/web3/_utils/windows.py +0 -0
  129. {web3-7.0.0b3 → web3-7.0.0b4}/web3/auto/__init__.py +0 -0
  130. {web3-7.0.0b3 → web3-7.0.0b4}/web3/auto/gethdev.py +0 -0
  131. {web3-7.0.0b3 → web3-7.0.0b4}/web3/beacon/__init__.py +0 -0
  132. {web3-7.0.0b3 → web3-7.0.0b4}/web3/beacon/api_endpoints.py +0 -0
  133. {web3-7.0.0b3 → web3-7.0.0b4}/web3/beacon/async_beacon.py +0 -0
  134. {web3-7.0.0b3 → web3-7.0.0b4}/web3/beacon/beacon.py +0 -0
  135. {web3-7.0.0b3 → web3-7.0.0b4}/web3/constants.py +0 -0
  136. {web3-7.0.0b3 → web3-7.0.0b4}/web3/contract/__init__.py +0 -0
  137. {web3-7.0.0b3 → web3-7.0.0b4}/web3/eth/__init__.py +0 -0
  138. {web3-7.0.0b3 → web3-7.0.0b4}/web3/gas_strategies/__init__.py +0 -0
  139. {web3-7.0.0b3 → web3-7.0.0b4}/web3/gas_strategies/rpc.py +0 -0
  140. {web3-7.0.0b3 → web3-7.0.0b4}/web3/logs.py +0 -0
  141. {web3-7.0.0b3 → web3-7.0.0b4}/web3/middleware/__init__.py +0 -0
  142. {web3-7.0.0b3 → web3-7.0.0b4}/web3/middleware/attrdict.py +0 -0
  143. {web3-7.0.0b3 → web3-7.0.0b4}/web3/middleware/buffered_gas_estimate.py +0 -0
  144. {web3-7.0.0b3 → web3-7.0.0b4}/web3/middleware/gas_price_strategy.py +0 -0
  145. {web3-7.0.0b3 → web3-7.0.0b4}/web3/middleware/proof_of_authority.py +0 -0
  146. {web3-7.0.0b3 → web3-7.0.0b4}/web3/middleware/pythonic.py +0 -0
  147. {web3-7.0.0b3 → web3-7.0.0b4}/web3/middleware/validation.py +0 -0
  148. {web3-7.0.0b3 → web3-7.0.0b4}/web3/module.py +0 -0
  149. {web3-7.0.0b3 → web3-7.0.0b4}/web3/net.py +0 -0
  150. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/__init__.py +0 -0
  151. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/async_base.py +0 -0
  152. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/auto.py +0 -0
  153. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/base.py +0 -0
  154. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/eth_tester/__init__.py +0 -0
  155. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/legacy_websocket.py +0 -0
  156. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/persistent/__init__.py +0 -0
  157. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/persistent/persistent_connection.py +0 -0
  158. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/persistent/utils.py +0 -0
  159. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/rpc/__init__.py +0 -0
  160. {web3-7.0.0b3 → web3-7.0.0b4}/web3/providers/rpc/utils.py +0 -0
  161. {web3-7.0.0b3 → web3-7.0.0b4}/web3/py.typed +0 -0
  162. {web3-7.0.0b3 → web3-7.0.0b4}/web3/scripts/__init__.py +0 -0
  163. {web3-7.0.0b3 → web3-7.0.0b4}/web3/scripts/release/__init__.py +0 -0
  164. {web3-7.0.0b3 → web3-7.0.0b4}/web3/scripts/release/test_package.py +0 -0
  165. {web3-7.0.0b3 → web3-7.0.0b4}/web3/tools/benchmark/__init__.py +0 -0
  166. {web3-7.0.0b3 → web3-7.0.0b4}/web3/tools/benchmark/node.py +0 -0
  167. {web3-7.0.0b3 → web3-7.0.0b4}/web3/tools/benchmark/reporting.py +0 -0
  168. {web3-7.0.0b3 → web3-7.0.0b4}/web3/utils/__init__.py +0 -0
  169. {web3-7.0.0b3 → web3-7.0.0b4}/web3/utils/abi.py +0 -0
  170. {web3-7.0.0b3 → web3-7.0.0b4}/web3/utils/address.py +0 -0
  171. {web3-7.0.0b3 → web3-7.0.0b4}/web3/utils/async_exception_handling.py +0 -0
  172. {web3-7.0.0b3 → web3-7.0.0b4}/web3/utils/caching.py +0 -0
  173. {web3-7.0.0b3 → web3-7.0.0b4}/web3/utils/exception_handling.py +0 -0
  174. {web3-7.0.0b3 → web3-7.0.0b4}/web3.egg-info/SOURCES.txt +0 -0
  175. {web3-7.0.0b3 → web3-7.0.0b4}/web3.egg-info/dependency_links.txt +0 -0
  176. {web3-7.0.0b3 → web3-7.0.0b4}/web3.egg-info/not-zip-safe +0 -0
  177. {web3-7.0.0b3 → web3-7.0.0b4}/web3.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: web3
3
- Version: 7.0.0b3
3
+ Version: 7.0.0b4
4
4
  Summary: web3.py
5
5
  Home-page: https://github.com/ethereum/web3.py
6
6
  Author: The Ethereum Foundation
@@ -20,12 +20,12 @@ Requires-Python: >=3.8
20
20
  Description-Content-Type: text/markdown
21
21
  License-File: LICENSE
22
22
  Requires-Dist: aiohttp>=3.7.4.post0
23
- Requires-Dist: eth-abi>=4.0.0
24
- Requires-Dist: eth-account>=0.8.0
23
+ Requires-Dist: eth-abi>=5.0.1
24
+ Requires-Dist: eth-account>=0.12.0
25
25
  Requires-Dist: eth-hash[pycryptodome]>=0.5.1
26
- Requires-Dist: eth-typing>=3.0.0
26
+ Requires-Dist: eth-typing>=4.0.0
27
27
  Requires-Dist: eth-utils>=4.0.0
28
- Requires-Dist: hexbytes<0.4.0,>=0.1.0
28
+ Requires-Dist: hexbytes>=1.2.0
29
29
  Requires-Dist: pydantic>=2.4.0
30
30
  Requires-Dist: pywin32>=223; platform_system == "Windows"
31
31
  Requires-Dist: requests>=2.16.0
@@ -33,47 +33,32 @@ Requires-Dist: typing-extensions>=4.0.1
33
33
  Requires-Dist: websockets>=10.0.0
34
34
  Requires-Dist: pyunormalize>=15.0.0
35
35
  Provides-Extra: tester
36
- Requires-Dist: eth-tester[py-evm]==v0.10.0-b.3; extra == "tester"
36
+ Requires-Dist: eth-tester[py-evm]<0.12.0b1,>=0.11.0b1; extra == "tester"
37
37
  Requires-Dist: py-geth>=4.1.0; extra == "tester"
38
- Provides-Extra: linter
39
- Requires-Dist: black>=22.1.0; extra == "linter"
40
- Requires-Dist: blocklint>=0.2.4; extra == "linter"
41
- Requires-Dist: flake8==3.8.3; extra == "linter"
42
- Requires-Dist: isort>=5.11.0; extra == "linter"
43
- Requires-Dist: mypy==1.4.1; extra == "linter"
44
- Requires-Dist: types-setuptools>=57.4.4; extra == "linter"
45
- Requires-Dist: types-requests>=2.26.1; extra == "linter"
46
38
  Provides-Extra: docs
47
39
  Requires-Dist: sphinx>=5.3.0; extra == "docs"
48
40
  Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "docs"
49
41
  Requires-Dist: towncrier<22,>=21; extra == "docs"
50
42
  Provides-Extra: dev
51
- Requires-Dist: eth-tester[py-evm]==v0.10.0-b.3; extra == "dev"
43
+ Requires-Dist: eth-tester[py-evm]<0.12.0b1,>=0.11.0b1; extra == "dev"
52
44
  Requires-Dist: py-geth>=4.1.0; extra == "dev"
53
- Requires-Dist: black>=22.1.0; extra == "dev"
54
- Requires-Dist: blocklint>=0.2.4; extra == "dev"
55
- Requires-Dist: flake8==3.8.3; extra == "dev"
56
- Requires-Dist: isort>=5.11.0; extra == "dev"
57
- Requires-Dist: mypy==1.4.1; extra == "dev"
58
- Requires-Dist: types-setuptools>=57.4.4; extra == "dev"
59
- Requires-Dist: types-requests>=2.26.1; extra == "dev"
60
45
  Requires-Dist: sphinx>=5.3.0; extra == "dev"
61
46
  Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "dev"
62
47
  Requires-Dist: towncrier<22,>=21; extra == "dev"
48
+ Requires-Dist: build>=0.9.0; extra == "dev"
63
49
  Requires-Dist: bumpversion; extra == "dev"
64
50
  Requires-Dist: flaky>=3.7.0; extra == "dev"
65
51
  Requires-Dist: hypothesis>=3.31.2; extra == "dev"
66
- Requires-Dist: importlib-metadata<5.0; python_version < "3.8" and extra == "dev"
67
- Requires-Dist: pytest>=7.0.0; extra == "dev"
52
+ Requires-Dist: pre-commit>=3.4.0; extra == "dev"
68
53
  Requires-Dist: pytest-asyncio<0.23,>=0.18.1; extra == "dev"
69
54
  Requires-Dist: pytest-mock>=1.10; extra == "dev"
70
55
  Requires-Dist: pytest-watch>=4.2; extra == "dev"
71
56
  Requires-Dist: pytest-xdist>=1.29; extra == "dev"
57
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
72
58
  Requires-Dist: setuptools>=38.6.0; extra == "dev"
73
59
  Requires-Dist: tox>=3.18.0; extra == "dev"
74
60
  Requires-Dist: tqdm>4.32; extra == "dev"
75
61
  Requires-Dist: twine>=1.13; extra == "dev"
76
- Requires-Dist: build>=0.9.0; extra == "dev"
77
62
 
78
63
  # web3.py
79
64
 
@@ -83,9 +68,9 @@ Requires-Dist: build>=0.9.0; extra == "dev"
83
68
 
84
69
  A Python library for interacting with Ethereum.
85
70
 
86
- - Python 3.8+ support
71
+ - Python 3.8+ support
87
72
 
88
- ---
73
+ ______________________________________________________________________
89
74
 
90
75
  ## Quickstart
91
76
 
@@ -103,6 +88,6 @@ guidelines for [contributing](https://web3py.readthedocs.io/en/latest/contributi
103
88
  then check out issues that are labeled
104
89
  [Good First Issue](https://github.com/ethereum/web3.py/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good+First+Issue%22).
105
90
 
106
- ---
91
+ ______________________________________________________________________
107
92
 
108
93
  #### Questions on implementation or usage? Join the conversation on [discord](https://discord.gg/GHryRvPB84).
@@ -6,9 +6,9 @@
6
6
 
7
7
  A Python library for interacting with Ethereum.
8
8
 
9
- - Python 3.8+ support
9
+ - Python 3.8+ support
10
10
 
11
- ---
11
+ ______________________________________________________________________
12
12
 
13
13
  ## Quickstart
14
14
 
@@ -26,6 +26,6 @@ guidelines for [contributing](https://web3py.readthedocs.io/en/latest/contributi
26
26
  then check out issues that are labeled
27
27
  [Good First Issue](https://github.com/ethereum/web3.py/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good+First+Issue%22).
28
28
 
29
- ---
29
+ ______________________________________________________________________
30
30
 
31
31
  #### Questions on implementation or usage? Join the conversation on [discord](https://discord.gg/GHryRvPB84).
@@ -48,7 +48,7 @@ with open(os.path.join(specs_dir_path, "normalization_spec.json")) as spec:
48
48
  # clean `FE0F` (65039) from entries since it's optional
49
49
  for e in NORMALIZATION_SPEC["emoji"]:
50
50
  if 65039 in e:
51
- for i in range(e.count(65039)):
51
+ for _ in range(e.count(65039)):
52
52
  e.remove(65039)
53
53
 
54
54
  with open(os.path.join(specs_dir_path, "nf.json")) as nf:
@@ -222,7 +222,6 @@ def _validate_tokens_and_get_label_type(tokens: List[Token]) -> str:
222
222
  :param List[Token] tokens: the tokens to validate
223
223
  :raises InvalidName: if any of the tokens are invalid
224
224
  """
225
-
226
225
  if all(token.type == TokenType.EMOJI for token in tokens):
227
226
  return "emoji"
228
227
 
@@ -423,7 +422,6 @@ def normalize_name_ensip15(name: str) -> ENSNormalizedName:
423
422
  :param str name: the dot-separated ENS name
424
423
  :raises InvalidName: if ``name`` has invalid syntax
425
424
  """
426
-
427
425
  if not name:
428
426
  raise InvalidName("Name cannot be empty")
429
427
  elif isinstance(name, (bytes, bytearray)):
@@ -46,6 +46,7 @@ from ens.constants import (
46
46
  )
47
47
  from ens.exceptions import (
48
48
  AddressMismatch,
49
+ ENSValueError,
49
50
  ResolverNotFound,
50
51
  UnauthorizedError,
51
52
  UnownedName,
@@ -98,7 +99,7 @@ class AsyncENS(BaseENS):
98
99
 
99
100
  def __init__(
100
101
  self,
101
- provider: "AsyncBaseProvider" = cast("AsyncBaseProvider", default),
102
+ provider: "AsyncBaseProvider" = None,
102
103
  addr: ChecksumAddress = None,
103
104
  middleware: Optional[Sequence[Tuple["Middleware", str]]] = None,
104
105
  ) -> None:
@@ -108,6 +109,7 @@ class AsyncENS(BaseENS):
108
109
  :param hex-string addr: the address of the ENS registry on-chain.
109
110
  If not provided, ENS.py will default to the mainnet ENS registry address.
110
111
  """
112
+ provider = provider or cast("AsyncBaseProvider", default)
111
113
  self.w3 = init_async_web3(provider, middleware)
112
114
 
113
115
  ens_addr = addr if addr else ENS_MAINNET_ADDR
@@ -167,7 +169,7 @@ class AsyncENS(BaseENS):
167
169
  async def setup_address(
168
170
  self,
169
171
  name: str,
170
- address: Union[Address, ChecksumAddress, HexAddress] = cast(
172
+ address: Union[Address, ChecksumAddress, HexAddress] = cast( # noqa: B008
171
173
  ChecksumAddress, default
172
174
  ),
173
175
  coin_type: Optional[int] = None,
@@ -204,7 +206,7 @@ class AsyncENS(BaseENS):
204
206
  elif is_binary_address(address):
205
207
  address = to_checksum_address(cast(str, address))
206
208
  elif not is_checksum_address(address):
207
- raise ValueError("You must supply the address in checksum format")
209
+ raise ENSValueError("You must supply the address in checksum format")
208
210
  if await self.address(name) == address:
209
211
  return None
210
212
  if address is None:
@@ -282,7 +284,7 @@ class AsyncENS(BaseENS):
282
284
  if is_binary_address(address):
283
285
  address = to_checksum_address(address)
284
286
  if not is_checksum_address(address):
285
- raise ValueError("You must supply the address in checksum format")
287
+ raise ENSValueError("You must supply the address in checksum format")
286
288
  await self._assert_control(address, name)
287
289
  if not resolved:
288
290
  await self.setup_address(name, address, transact=transact)
@@ -305,7 +307,7 @@ class AsyncENS(BaseENS):
305
307
  async def setup_owner(
306
308
  self,
307
309
  name: str,
308
- new_owner: ChecksumAddress = cast(ChecksumAddress, default),
310
+ new_owner: ChecksumAddress = None,
309
311
  transact: Optional["TxParams"] = None,
310
312
  ) -> Optional[ChecksumAddress]:
311
313
  """
@@ -332,6 +334,7 @@ class AsyncENS(BaseENS):
332
334
  :raises UnauthorizedError: if ``'from'`` in `transact` does not own `name`
333
335
  :returns: the new owner's address
334
336
  """
337
+ new_owner = new_owner or cast(ChecksumAddress, default)
335
338
  if not transact:
336
339
  transact = {}
337
340
  transact = deepcopy(transact)
@@ -466,9 +469,9 @@ class AsyncENS(BaseENS):
466
469
  resolver_addr = await self.address("resolver.eth")
467
470
  namehash = raw_name_to_hash(name)
468
471
  if await self.ens.caller.resolver(namehash) != resolver_addr:
469
- await self.ens.functions.setResolver( # type: ignore
470
- namehash, resolver_addr
471
- ).transact(transact)
472
+ await self.ens.functions.setResolver(namehash, resolver_addr).transact(
473
+ transact
474
+ )
472
475
  return cast("AsyncContract", self._resolver_contract(address=resolver_addr))
473
476
 
474
477
  async def _resolve(
@@ -550,7 +553,7 @@ class AsyncENS(BaseENS):
550
553
  transact = deepcopy(transact)
551
554
  transact["from"] = old_owner or owner
552
555
  for label in reversed(unowned):
553
- await self.ens.functions.setSubnodeOwner( # type: ignore
556
+ await self.ens.functions.setSubnodeOwner(
554
557
  raw_name_to_hash(owned),
555
558
  label_to_hash(label),
556
559
  owner,
@@ -3,8 +3,8 @@ import json
3
3
 
4
4
  """
5
5
  This contract data is taken from the actual ENS contracts deployed on mainnet.
6
- The information was taken from etherscan.io and may need to be updated as the ENS
7
- contracts are updated.
6
+ The information was taken from etherscan.io and may need to be updated as the ENS
7
+ contracts are updated.
8
8
 
9
9
  https://etherscan.io/accounts/label/ens
10
10
  """
@@ -46,6 +46,7 @@ from .constants import (
46
46
  )
47
47
  from .exceptions import (
48
48
  AddressMismatch,
49
+ ENSValueError,
49
50
  ResolverNotFound,
50
51
  UnauthorizedError,
51
52
  UnownedName,
@@ -97,7 +98,7 @@ class ENS(BaseENS):
97
98
 
98
99
  def __init__(
99
100
  self,
100
- provider: "BaseProvider" = cast("BaseProvider", default),
101
+ provider: "BaseProvider" = None,
101
102
  addr: ChecksumAddress = None,
102
103
  middleware: Optional[Sequence[Tuple["Middleware", str]]] = None,
103
104
  ) -> None:
@@ -108,6 +109,7 @@ class ENS(BaseENS):
108
109
  If not provided, ENS.py will default to the mainnet ENS
109
110
  registry address.
110
111
  """
112
+ provider = provider or cast("BaseProvider", default)
111
113
  self.w3 = init_web3(provider, middleware)
112
114
 
113
115
  ens_addr = addr if addr else ENS_MAINNET_ADDR
@@ -170,7 +172,7 @@ class ENS(BaseENS):
170
172
  def setup_address(
171
173
  self,
172
174
  name: str,
173
- address: Union[Address, ChecksumAddress, HexAddress] = cast(
175
+ address: Union[Address, ChecksumAddress, HexAddress] = cast( # noqa: B008
174
176
  ChecksumAddress, default
175
177
  ),
176
178
  coin_type: Optional[int] = None,
@@ -208,7 +210,7 @@ class ENS(BaseENS):
208
210
  elif is_binary_address(address):
209
211
  address = to_checksum_address(cast(str, address))
210
212
  elif not is_checksum_address(address):
211
- raise ValueError("You must supply the address in checksum format")
213
+ raise ENSValueError("You must supply the address in checksum format")
212
214
  if self.address(name) == address:
213
215
  return None
214
216
  if address is None:
@@ -284,7 +286,7 @@ class ENS(BaseENS):
284
286
  if is_binary_address(address):
285
287
  address = to_checksum_address(address)
286
288
  if not is_checksum_address(address):
287
- raise ValueError("You must supply the address in checksum format")
289
+ raise ENSValueError("You must supply the address in checksum format")
288
290
  self._assert_control(address, name)
289
291
  if not resolved:
290
292
  self.setup_address(name, address, transact=transact)
@@ -307,7 +309,7 @@ class ENS(BaseENS):
307
309
  def setup_owner(
308
310
  self,
309
311
  name: str,
310
- new_owner: ChecksumAddress = cast(ChecksumAddress, default),
312
+ new_owner: ChecksumAddress = None,
311
313
  transact: Optional["TxParams"] = None,
312
314
  ) -> Optional[ChecksumAddress]:
313
315
  """
@@ -334,6 +336,7 @@ class ENS(BaseENS):
334
336
  :raises UnauthorizedError: if ``'from'`` in `transact` does not own `name`
335
337
  :returns: the new owner's address
336
338
  """
339
+ new_owner = new_owner or cast(ChecksumAddress, default)
337
340
  if not transact:
338
341
  transact = {}
339
342
 
@@ -9,7 +9,19 @@ class ENSException(Exception):
9
9
  Base class for all ENS Errors
10
10
  """
11
11
 
12
- pass
12
+
13
+ class ENSValueError(ENSException, ValueError):
14
+ """
15
+ An ENS exception wrapper for `ValueError`, for better control over
16
+ exception handling.
17
+ """
18
+
19
+
20
+ class ENSTypeError(ENSException, TypeError):
21
+ """
22
+ An ENS exception wrapper for `TypeError`, for better control over
23
+ exception handling.
24
+ """
13
25
 
14
26
 
15
27
  class AddressMismatch(ENSException):
@@ -19,18 +31,15 @@ class AddressMismatch(ENSException):
19
31
  not currently point to the address.
20
32
  """
21
33
 
22
- pass
23
34
 
24
-
25
- class InvalidName(idna.IDNAError, ENSException):
35
+ # type ignored because subclassing IDNAError which has type Any
36
+ class InvalidName(idna.IDNAError, ENSException): # type: ignore[misc]
26
37
  """
27
- This exception is raised if the provided name does not meet
28
- the normalization standards specified in `ENSIP-15
38
+ Raised if the provided name does not meet the normalization
39
+ standards specified in `ENSIP-15
29
40
  <https://docs.ens.domains/ens-improvement-proposals/ensip-15-normalization-standard>`_.
30
41
  """
31
42
 
32
- pass
33
-
34
43
 
35
44
  class UnauthorizedError(ENSException):
36
45
  """
@@ -39,8 +48,6 @@ class UnauthorizedError(ENSException):
39
48
  ``transact`` keyword argument to the owner of the name.
40
49
  """
41
50
 
42
- pass
43
-
44
51
 
45
52
  class UnownedName(ENSException):
46
53
  """
@@ -50,48 +57,36 @@ class UnownedName(ENSException):
50
57
  first with :meth:`~ens.ENS.setup_address`.
51
58
  """
52
59
 
53
- pass
54
-
55
60
 
56
61
  class ResolverNotFound(ENSException):
57
62
  """
58
63
  Raised if no resolver was found for the name you are trying to resolve.
59
64
  """
60
65
 
61
- pass
62
-
63
66
 
64
67
  class UnsupportedFunction(ENSException):
65
68
  """
66
69
  Raised if a resolver does not support a particular method.
67
70
  """
68
71
 
69
- pass
70
-
71
72
 
72
73
  class BidTooLow(ENSException):
73
74
  """
74
75
  Raised if you bid less than the minimum amount
75
76
  """
76
77
 
77
- pass
78
-
79
78
 
80
79
  class InvalidBidHash(ENSException):
81
80
  """
82
81
  Raised if you supply incorrect data to generate the bid hash.
83
82
  """
84
83
 
85
- pass
86
-
87
84
 
88
85
  class InvalidLabel(ENSException):
89
86
  """
90
87
  Raised if you supply an invalid label
91
88
  """
92
89
 
93
- pass
94
-
95
90
 
96
91
  class OversizeTransaction(ENSException):
97
92
  """
@@ -101,8 +96,6 @@ class OversizeTransaction(ENSException):
101
96
  For example: when you try to start too many auctions at once.
102
97
  """
103
98
 
104
- pass
105
-
106
99
 
107
100
  class UnderfundedBid(ENSException):
108
101
  """
@@ -110,10 +103,9 @@ class UnderfundedBid(ENSException):
110
103
  as your intent to bid.
111
104
  """
112
105
 
113
- pass
114
-
115
106
 
116
- class ENSValidationError(ENSException, ValidationError):
107
+ # type ignored because subclassing ValidationError which has type Any
108
+ class ENSValidationError(ENSException, ValidationError): # type: ignore[misc]
117
109
  """
118
110
  Raised if there is a validation error
119
111
  """