web3 6.17.2__tar.gz → 6.19.0__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 (293) hide show
  1. {web3-6.17.2 → web3-6.19.0}/PKG-INFO +2 -2
  2. {web3-6.17.2 → web3-6.19.0}/setup.py +2 -2
  3. {web3-6.17.2 → web3-6.19.0}/web3/_utils/decorators.py +22 -7
  4. {web3-6.17.2 → web3-6.19.0}/web3/_utils/miner.py +8 -12
  5. {web3-6.17.2 → web3-6.19.0}/web3/_utils/module_testing/go_ethereum_personal_module.py +67 -44
  6. {web3-6.17.2 → web3-6.19.0}/web3/_utils/module_testing/module_testing_utils.py +13 -0
  7. {web3-6.17.2 → web3-6.19.0}/web3/contract/base_contract.py +2 -2
  8. {web3-6.17.2 → web3-6.19.0}/web3/exceptions.py +19 -1
  9. {web3-6.17.2 → web3-6.19.0}/web3/geth.py +48 -10
  10. {web3-6.17.2 → web3-6.19.0}/web3/main.py +5 -8
  11. {web3-6.17.2 → web3-6.19.0}/web3/manager.py +19 -8
  12. {web3-6.17.2 → web3-6.19.0}/web3/method.py +11 -3
  13. web3-6.19.0/web3/providers/persistent.py +214 -0
  14. {web3-6.17.2 → web3-6.19.0}/web3/providers/websocket/request_processor.py +40 -5
  15. web3-6.19.0/web3/providers/websocket/websocket_v2.py +146 -0
  16. {web3-6.17.2 → web3-6.19.0}/web3/tools/pytest_ethereum/deployer.py +1 -1
  17. {web3-6.17.2 → web3-6.19.0}/web3.egg-info/PKG-INFO +2 -2
  18. {web3-6.17.2 → web3-6.19.0}/web3.egg-info/requires.txt +1 -1
  19. web3-6.17.2/web3/providers/persistent.py +0 -55
  20. web3-6.17.2/web3/providers/websocket/websocket_v2.py +0 -242
  21. {web3-6.17.2 → web3-6.19.0}/LICENSE +0 -0
  22. {web3-6.17.2 → web3-6.19.0}/MANIFEST.in +0 -0
  23. {web3-6.17.2 → web3-6.19.0}/README.md +0 -0
  24. {web3-6.17.2 → web3-6.19.0}/ens/__init__.py +0 -0
  25. {web3-6.17.2 → web3-6.19.0}/ens/_normalization.py +0 -0
  26. {web3-6.17.2 → web3-6.19.0}/ens/abis.py +0 -0
  27. {web3-6.17.2 → web3-6.19.0}/ens/async_ens.py +0 -0
  28. {web3-6.17.2 → web3-6.19.0}/ens/auto.py +0 -0
  29. {web3-6.17.2 → web3-6.19.0}/ens/base_ens.py +0 -0
  30. {web3-6.17.2 → web3-6.19.0}/ens/constants.py +0 -0
  31. {web3-6.17.2 → web3-6.19.0}/ens/contract_data.py +0 -0
  32. {web3-6.17.2 → web3-6.19.0}/ens/ens.py +0 -0
  33. {web3-6.17.2 → web3-6.19.0}/ens/exceptions.py +0 -0
  34. {web3-6.17.2 → web3-6.19.0}/ens/specs/nf.json +0 -0
  35. {web3-6.17.2 → web3-6.19.0}/ens/specs/normalization_spec.json +0 -0
  36. {web3-6.17.2 → web3-6.19.0}/ens/utils.py +0 -0
  37. {web3-6.17.2 → web3-6.19.0}/ethpm/__init__.py +0 -0
  38. {web3-6.17.2 → web3-6.19.0}/ethpm/_utils/__init__.py +0 -0
  39. {web3-6.17.2 → web3-6.19.0}/ethpm/_utils/backend.py +0 -0
  40. {web3-6.17.2 → web3-6.19.0}/ethpm/_utils/cache.py +0 -0
  41. {web3-6.17.2 → web3-6.19.0}/ethpm/_utils/chains.py +0 -0
  42. {web3-6.17.2 → web3-6.19.0}/ethpm/_utils/contract.py +0 -0
  43. {web3-6.17.2 → web3-6.19.0}/ethpm/_utils/deployments.py +0 -0
  44. {web3-6.17.2 → web3-6.19.0}/ethpm/_utils/ipfs.py +0 -0
  45. {web3-6.17.2 → web3-6.19.0}/ethpm/_utils/protobuf/__init__.py +0 -0
  46. {web3-6.17.2 → web3-6.19.0}/ethpm/_utils/protobuf/ipfs_file_pb2.py +0 -0
  47. {web3-6.17.2 → web3-6.19.0}/ethpm/_utils/registry.py +0 -0
  48. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/__init__.py +0 -0
  49. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/ens/v3.json +0 -0
  50. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/escrow/with_bytecode_v3.json +0 -0
  51. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/ipfs_file.proto +0 -0
  52. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/owned/output_v3.json +0 -0
  53. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/owned/with_contract_type_v3.json +0 -0
  54. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/registry/contracts/Authority.sol +0 -0
  55. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/registry/contracts/IndexedOrderedSetLib.sol +0 -0
  56. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/registry/contracts/PackageDB.sol +0 -0
  57. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/registry/contracts/PackageRegistry.sol +0 -0
  58. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/registry/contracts/PackageRegistryInterface.sol +0 -0
  59. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/registry/contracts/ReleaseDB.sol +0 -0
  60. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/registry/contracts/ReleaseValidator.sol +0 -0
  61. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/registry/solc_input.json +0 -0
  62. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/registry/solc_output.json +0 -0
  63. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/registry/v3.json +0 -0
  64. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/safe-math-lib/v3-strict-no-deployments.json +0 -0
  65. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/simple-registry/contracts/Ownable.sol +0 -0
  66. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/simple-registry/contracts/PackageRegistry.sol +0 -0
  67. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/simple-registry/contracts/PackageRegistryInterface.sol +0 -0
  68. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/simple-registry/solc_input.json +0 -0
  69. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/simple-registry/solc_output.json +0 -0
  70. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/simple-registry/v3.json +0 -0
  71. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/standard-token/output_v3.json +0 -0
  72. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/standard-token/with_bytecode_v3.json +0 -0
  73. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/vyper_registry/0.1.0.json +0 -0
  74. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/vyper_registry/registry.vy +0 -0
  75. {web3-6.17.2 → web3-6.19.0}/ethpm/assets/vyper_registry/registry_with_delete.vy +0 -0
  76. {web3-6.17.2 → web3-6.19.0}/ethpm/backends/__init__.py +0 -0
  77. {web3-6.17.2 → web3-6.19.0}/ethpm/backends/base.py +0 -0
  78. {web3-6.17.2 → web3-6.19.0}/ethpm/backends/http.py +0 -0
  79. {web3-6.17.2 → web3-6.19.0}/ethpm/backends/ipfs.py +0 -0
  80. {web3-6.17.2 → web3-6.19.0}/ethpm/backends/registry.py +0 -0
  81. {web3-6.17.2 → web3-6.19.0}/ethpm/constants.py +0 -0
  82. {web3-6.17.2 → web3-6.19.0}/ethpm/contract.py +0 -0
  83. {web3-6.17.2 → web3-6.19.0}/ethpm/dependencies.py +0 -0
  84. {web3-6.17.2 → web3-6.19.0}/ethpm/deployments.py +0 -0
  85. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/escrow/1.0.0-pretty.json +0 -0
  86. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/escrow/1.0.0.json +0 -0
  87. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/escrow/contracts/Escrow.sol +0 -0
  88. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/escrow/contracts/SafeSendLib.sol +0 -0
  89. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/escrow/v3-pretty.json +0 -0
  90. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/escrow/v3.json +0 -0
  91. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/owned/1.0.0-pretty.json +0 -0
  92. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/owned/1.0.0.json +0 -0
  93. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/owned/contracts/Owned.sol +0 -0
  94. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/owned/v3-pretty.json +0 -0
  95. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/owned/v3.json +0 -0
  96. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/piper-coin/1.0.0-pretty.json +0 -0
  97. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/piper-coin/1.0.0.json +0 -0
  98. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/piper-coin/v3-pretty.json +0 -0
  99. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/piper-coin/v3.json +0 -0
  100. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/safe-math-lib/1.0.0-pretty.json +0 -0
  101. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/safe-math-lib/1.0.0.json +0 -0
  102. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/safe-math-lib/contracts/SafeMathLib.sol +0 -0
  103. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/safe-math-lib/v3-pretty.json +0 -0
  104. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/safe-math-lib/v3.json +0 -0
  105. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/standard-token/1.0.0-pretty.json +0 -0
  106. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/standard-token/1.0.0.json +0 -0
  107. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/standard-token/contracts/AbstractToken.sol +0 -0
  108. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/standard-token/contracts/StandardToken.sol +0 -0
  109. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/standard-token/v3-pretty.json +0 -0
  110. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/standard-token/v3.json +0 -0
  111. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/transferable/1.0.0-pretty.json +0 -0
  112. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/transferable/1.0.0.json +0 -0
  113. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/transferable/contracts/Transferable.sol +0 -0
  114. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/transferable/v3-pretty.json +0 -0
  115. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/transferable/v3.json +0 -0
  116. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/wallet/1.0.0-pretty.json +0 -0
  117. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/wallet/1.0.0.json +0 -0
  118. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/wallet/contracts/Wallet.sol +0 -0
  119. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/wallet/v3-pretty.json +0 -0
  120. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/wallet/v3.json +0 -0
  121. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/wallet-with-send/1.0.0-pretty.json +0 -0
  122. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/wallet-with-send/1.0.0.json +0 -0
  123. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/wallet-with-send/contracts/WalletWithSend.sol +0 -0
  124. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/wallet-with-send/v3-pretty.json +0 -0
  125. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/examples/wallet-with-send/v3.json +0 -0
  126. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/spec/package.spec.json +0 -0
  127. {web3-6.17.2 → web3-6.19.0}/ethpm/ethpm-spec/spec/v3.spec.json +0 -0
  128. {web3-6.17.2 → web3-6.19.0}/ethpm/exceptions.py +0 -0
  129. {web3-6.17.2 → web3-6.19.0}/ethpm/package.py +0 -0
  130. {web3-6.17.2 → web3-6.19.0}/ethpm/tools/__init__.py +0 -0
  131. {web3-6.17.2 → web3-6.19.0}/ethpm/tools/builder.py +0 -0
  132. {web3-6.17.2 → web3-6.19.0}/ethpm/tools/checker.py +0 -0
  133. {web3-6.17.2 → web3-6.19.0}/ethpm/tools/get_manifest.py +0 -0
  134. {web3-6.17.2 → web3-6.19.0}/ethpm/uri.py +0 -0
  135. {web3-6.17.2 → web3-6.19.0}/ethpm/validation/__init__.py +0 -0
  136. {web3-6.17.2 → web3-6.19.0}/ethpm/validation/manifest.py +0 -0
  137. {web3-6.17.2 → web3-6.19.0}/ethpm/validation/misc.py +0 -0
  138. {web3-6.17.2 → web3-6.19.0}/ethpm/validation/package.py +0 -0
  139. {web3-6.17.2 → web3-6.19.0}/ethpm/validation/uri.py +0 -0
  140. {web3-6.17.2 → web3-6.19.0}/pyproject.toml +0 -0
  141. {web3-6.17.2 → web3-6.19.0}/setup.cfg +0 -0
  142. {web3-6.17.2 → web3-6.19.0}/web3/__init__.py +0 -0
  143. {web3-6.17.2 → web3-6.19.0}/web3/_utils/__init__.py +0 -0
  144. {web3-6.17.2 → web3-6.19.0}/web3/_utils/abi.py +0 -0
  145. {web3-6.17.2 → web3-6.19.0}/web3/_utils/async_caching.py +0 -0
  146. {web3-6.17.2 → web3-6.19.0}/web3/_utils/async_transactions.py +0 -0
  147. {web3-6.17.2 → web3-6.19.0}/web3/_utils/blocks.py +0 -0
  148. {web3-6.17.2 → web3-6.19.0}/web3/_utils/caching.py +0 -0
  149. {web3-6.17.2 → web3-6.19.0}/web3/_utils/compat/__init__.py +0 -0
  150. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/__init__.py +0 -0
  151. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/compile_contracts.py +0 -0
  152. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/__init__.py +0 -0
  153. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/_custom_contract_data.py +0 -0
  154. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/address_reflector.py +0 -0
  155. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/arrays_contract.py +0 -0
  156. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/bytes_contracts.py +0 -0
  157. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/constructor_contracts.py +0 -0
  158. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/contract_caller_tester.py +0 -0
  159. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/emitter_contract.py +0 -0
  160. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/event_contracts.py +0 -0
  161. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/extended_resolver.py +0 -0
  162. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/fallback_function_contract.py +0 -0
  163. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/function_name_tester_contract.py +0 -0
  164. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/math_contract.py +0 -0
  165. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/offchain_lookup.py +0 -0
  166. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/offchain_resolver.py +0 -0
  167. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/panic_errors_contract.py +0 -0
  168. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/payable_tester.py +0 -0
  169. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/receive_function_contracts.py +0 -0
  170. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/reflector_contracts.py +0 -0
  171. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/revert_contract.py +0 -0
  172. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/simple_resolver.py +0 -0
  173. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/storage_contract.py +0 -0
  174. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/string_contract.py +0 -0
  175. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contract_sources/contract_data/tuple_contracts.py +0 -0
  176. {web3-6.17.2 → web3-6.19.0}/web3/_utils/contracts.py +0 -0
  177. {web3-6.17.2 → web3-6.19.0}/web3/_utils/datatypes.py +0 -0
  178. {web3-6.17.2 → web3-6.19.0}/web3/_utils/empty.py +0 -0
  179. {web3-6.17.2 → web3-6.19.0}/web3/_utils/encoding.py +0 -0
  180. {web3-6.17.2 → web3-6.19.0}/web3/_utils/ens.py +0 -0
  181. {web3-6.17.2 → web3-6.19.0}/web3/_utils/error_formatters_utils.py +0 -0
  182. {web3-6.17.2 → web3-6.19.0}/web3/_utils/events.py +0 -0
  183. {web3-6.17.2 → web3-6.19.0}/web3/_utils/fee_utils.py +0 -0
  184. {web3-6.17.2 → web3-6.19.0}/web3/_utils/filters.py +0 -0
  185. {web3-6.17.2 → web3-6.19.0}/web3/_utils/formatters.py +0 -0
  186. {web3-6.17.2 → web3-6.19.0}/web3/_utils/function_identifiers.py +0 -0
  187. {web3-6.17.2 → web3-6.19.0}/web3/_utils/http.py +0 -0
  188. {web3-6.17.2 → web3-6.19.0}/web3/_utils/hypothesis.py +0 -0
  189. {web3-6.17.2 → web3-6.19.0}/web3/_utils/math.py +0 -0
  190. {web3-6.17.2 → web3-6.19.0}/web3/_utils/method_formatters.py +0 -0
  191. {web3-6.17.2 → web3-6.19.0}/web3/_utils/module.py +0 -0
  192. {web3-6.17.2 → web3-6.19.0}/web3/_utils/module_testing/__init__.py +0 -0
  193. {web3-6.17.2 → web3-6.19.0}/web3/_utils/module_testing/eth_module.py +0 -0
  194. {web3-6.17.2 → web3-6.19.0}/web3/_utils/module_testing/go_ethereum_admin_module.py +0 -0
  195. {web3-6.17.2 → web3-6.19.0}/web3/_utils/module_testing/go_ethereum_txpool_module.py +0 -0
  196. {web3-6.17.2 → web3-6.19.0}/web3/_utils/module_testing/net_module.py +0 -0
  197. {web3-6.17.2 → web3-6.19.0}/web3/_utils/module_testing/persistent_connection_provider.py +0 -0
  198. {web3-6.17.2 → web3-6.19.0}/web3/_utils/module_testing/web3_module.py +0 -0
  199. {web3-6.17.2 → web3-6.19.0}/web3/_utils/normalizers.py +0 -0
  200. {web3-6.17.2 → web3-6.19.0}/web3/_utils/request.py +0 -0
  201. {web3-6.17.2 → web3-6.19.0}/web3/_utils/rpc_abi.py +0 -0
  202. {web3-6.17.2 → web3-6.19.0}/web3/_utils/threads.py +0 -0
  203. {web3-6.17.2 → web3-6.19.0}/web3/_utils/transactions.py +0 -0
  204. {web3-6.17.2 → web3-6.19.0}/web3/_utils/type_conversion.py +0 -0
  205. {web3-6.17.2 → web3-6.19.0}/web3/_utils/utility_methods.py +0 -0
  206. {web3-6.17.2 → web3-6.19.0}/web3/_utils/validation.py +0 -0
  207. {web3-6.17.2 → web3-6.19.0}/web3/_utils/windows.py +0 -0
  208. {web3-6.17.2 → web3-6.19.0}/web3/auto/__init__.py +0 -0
  209. {web3-6.17.2 → web3-6.19.0}/web3/auto/gethdev.py +0 -0
  210. {web3-6.17.2 → web3-6.19.0}/web3/beacon/__init__.py +0 -0
  211. {web3-6.17.2 → web3-6.19.0}/web3/beacon/api_endpoints.py +0 -0
  212. {web3-6.17.2 → web3-6.19.0}/web3/beacon/async_beacon.py +0 -0
  213. {web3-6.17.2 → web3-6.19.0}/web3/beacon/main.py +0 -0
  214. {web3-6.17.2 → web3-6.19.0}/web3/constants.py +0 -0
  215. {web3-6.17.2 → web3-6.19.0}/web3/contract/__init__.py +0 -0
  216. {web3-6.17.2 → web3-6.19.0}/web3/contract/async_contract.py +0 -0
  217. {web3-6.17.2 → web3-6.19.0}/web3/contract/contract.py +0 -0
  218. {web3-6.17.2 → web3-6.19.0}/web3/contract/utils.py +0 -0
  219. {web3-6.17.2 → web3-6.19.0}/web3/datastructures.py +0 -0
  220. {web3-6.17.2 → web3-6.19.0}/web3/eth/__init__.py +0 -0
  221. {web3-6.17.2 → web3-6.19.0}/web3/eth/async_eth.py +0 -0
  222. {web3-6.17.2 → web3-6.19.0}/web3/eth/base_eth.py +0 -0
  223. {web3-6.17.2 → web3-6.19.0}/web3/eth/eth.py +0 -0
  224. {web3-6.17.2 → web3-6.19.0}/web3/gas_strategies/__init__.py +0 -0
  225. {web3-6.17.2 → web3-6.19.0}/web3/gas_strategies/rpc.py +0 -0
  226. {web3-6.17.2 → web3-6.19.0}/web3/gas_strategies/time_based.py +0 -0
  227. {web3-6.17.2 → web3-6.19.0}/web3/logs.py +0 -0
  228. {web3-6.17.2 → web3-6.19.0}/web3/middleware/__init__.py +0 -0
  229. {web3-6.17.2 → web3-6.19.0}/web3/middleware/abi.py +0 -0
  230. {web3-6.17.2 → web3-6.19.0}/web3/middleware/async_cache.py +0 -0
  231. {web3-6.17.2 → web3-6.19.0}/web3/middleware/attrdict.py +0 -0
  232. {web3-6.17.2 → web3-6.19.0}/web3/middleware/buffered_gas_estimate.py +0 -0
  233. {web3-6.17.2 → web3-6.19.0}/web3/middleware/cache.py +0 -0
  234. {web3-6.17.2 → web3-6.19.0}/web3/middleware/exception_handling.py +0 -0
  235. {web3-6.17.2 → web3-6.19.0}/web3/middleware/exception_retry_request.py +0 -0
  236. {web3-6.17.2 → web3-6.19.0}/web3/middleware/filter.py +0 -0
  237. {web3-6.17.2 → web3-6.19.0}/web3/middleware/fixture.py +0 -0
  238. {web3-6.17.2 → web3-6.19.0}/web3/middleware/formatting.py +0 -0
  239. {web3-6.17.2 → web3-6.19.0}/web3/middleware/gas_price_strategy.py +0 -0
  240. {web3-6.17.2 → web3-6.19.0}/web3/middleware/geth_poa.py +0 -0
  241. {web3-6.17.2 → web3-6.19.0}/web3/middleware/names.py +0 -0
  242. {web3-6.17.2 → web3-6.19.0}/web3/middleware/normalize_request_parameters.py +0 -0
  243. {web3-6.17.2 → web3-6.19.0}/web3/middleware/pythonic.py +0 -0
  244. {web3-6.17.2 → web3-6.19.0}/web3/middleware/signing.py +0 -0
  245. {web3-6.17.2 → web3-6.19.0}/web3/middleware/simulate_unmined_transaction.py +0 -0
  246. {web3-6.17.2 → web3-6.19.0}/web3/middleware/stalecheck.py +0 -0
  247. {web3-6.17.2 → web3-6.19.0}/web3/middleware/validation.py +0 -0
  248. {web3-6.17.2 → web3-6.19.0}/web3/module.py +0 -0
  249. {web3-6.17.2 → web3-6.19.0}/web3/net.py +0 -0
  250. {web3-6.17.2 → web3-6.19.0}/web3/pm.py +0 -0
  251. {web3-6.17.2 → web3-6.19.0}/web3/providers/__init__.py +0 -0
  252. {web3-6.17.2 → web3-6.19.0}/web3/providers/async_base.py +0 -0
  253. {web3-6.17.2 → web3-6.19.0}/web3/providers/async_rpc.py +0 -0
  254. {web3-6.17.2 → web3-6.19.0}/web3/providers/auto.py +0 -0
  255. {web3-6.17.2 → web3-6.19.0}/web3/providers/base.py +0 -0
  256. {web3-6.17.2 → web3-6.19.0}/web3/providers/eth_tester/__init__.py +0 -0
  257. {web3-6.17.2 → web3-6.19.0}/web3/providers/eth_tester/defaults.py +0 -0
  258. {web3-6.17.2 → web3-6.19.0}/web3/providers/eth_tester/main.py +0 -0
  259. {web3-6.17.2 → web3-6.19.0}/web3/providers/eth_tester/middleware.py +0 -0
  260. {web3-6.17.2 → web3-6.19.0}/web3/providers/ipc.py +0 -0
  261. {web3-6.17.2 → web3-6.19.0}/web3/providers/rpc.py +0 -0
  262. {web3-6.17.2 → web3-6.19.0}/web3/providers/websocket/__init__.py +0 -0
  263. {web3-6.17.2 → web3-6.19.0}/web3/providers/websocket/websocket.py +0 -0
  264. {web3-6.17.2 → web3-6.19.0}/web3/providers/websocket/websocket_connection.py +0 -0
  265. {web3-6.17.2 → web3-6.19.0}/web3/py.typed +0 -0
  266. {web3-6.17.2 → web3-6.19.0}/web3/scripts/__init__.py +0 -0
  267. {web3-6.17.2 → web3-6.19.0}/web3/scripts/release/__init__.py +0 -0
  268. {web3-6.17.2 → web3-6.19.0}/web3/scripts/release/test_package.py +0 -0
  269. {web3-6.17.2 → web3-6.19.0}/web3/testing.py +0 -0
  270. {web3-6.17.2 → web3-6.19.0}/web3/tools/__init__.py +0 -0
  271. {web3-6.17.2 → web3-6.19.0}/web3/tools/benchmark/__init__.py +0 -0
  272. {web3-6.17.2 → web3-6.19.0}/web3/tools/benchmark/main.py +0 -0
  273. {web3-6.17.2 → web3-6.19.0}/web3/tools/benchmark/node.py +0 -0
  274. {web3-6.17.2 → web3-6.19.0}/web3/tools/benchmark/reporting.py +0 -0
  275. {web3-6.17.2 → web3-6.19.0}/web3/tools/benchmark/utils.py +0 -0
  276. {web3-6.17.2 → web3-6.19.0}/web3/tools/pytest_ethereum/__init__.py +0 -0
  277. {web3-6.17.2 → web3-6.19.0}/web3/tools/pytest_ethereum/_utils.py +0 -0
  278. {web3-6.17.2 → web3-6.19.0}/web3/tools/pytest_ethereum/exceptions.py +0 -0
  279. {web3-6.17.2 → web3-6.19.0}/web3/tools/pytest_ethereum/linker.py +0 -0
  280. {web3-6.17.2 → web3-6.19.0}/web3/tools/pytest_ethereum/plugins.py +0 -0
  281. {web3-6.17.2 → web3-6.19.0}/web3/tracing.py +0 -0
  282. {web3-6.17.2 → web3-6.19.0}/web3/types.py +0 -0
  283. {web3-6.17.2 → web3-6.19.0}/web3/utils/__init__.py +0 -0
  284. {web3-6.17.2 → web3-6.19.0}/web3/utils/abi.py +0 -0
  285. {web3-6.17.2 → web3-6.19.0}/web3/utils/address.py +0 -0
  286. {web3-6.17.2 → web3-6.19.0}/web3/utils/async_exception_handling.py +0 -0
  287. {web3-6.17.2 → web3-6.19.0}/web3/utils/caching.py +0 -0
  288. {web3-6.17.2 → web3-6.19.0}/web3/utils/exception_handling.py +0 -0
  289. {web3-6.17.2 → web3-6.19.0}/web3.egg-info/SOURCES.txt +0 -0
  290. {web3-6.17.2 → web3-6.19.0}/web3.egg-info/dependency_links.txt +0 -0
  291. {web3-6.17.2 → web3-6.19.0}/web3.egg-info/entry_points.txt +0 -0
  292. {web3-6.17.2 → web3-6.19.0}/web3.egg-info/not-zip-safe +0 -0
  293. {web3-6.17.2 → web3-6.19.0}/web3.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: web3
3
- Version: 6.17.2
3
+ Version: 6.19.0
4
4
  Summary: web3.py
5
5
  Home-page: https://github.com/ethereum/web3.py
6
6
  Author: The Ethereum Foundation
@@ -57,7 +57,7 @@ Requires-Dist: hypothesis>=3.31.2; extra == "dev"
57
57
  Requires-Dist: importlib-metadata<5.0; python_version < "3.8" and extra == "dev"
58
58
  Requires-Dist: pre-commit>=2.21.0; extra == "dev"
59
59
  Requires-Dist: pytest>=7.0.0; extra == "dev"
60
- Requires-Dist: pytest-asyncio<0.23,>=0.18.1; extra == "dev"
60
+ Requires-Dist: pytest-asyncio<0.23,>=0.21.2; extra == "dev"
61
61
  Requires-Dist: pytest-mock>=1.10; extra == "dev"
62
62
  Requires-Dist: pytest-watch>=4.2; extra == "dev"
63
63
  Requires-Dist: pytest-xdist>=1.29; extra == "dev"
@@ -22,7 +22,7 @@ extras_require = {
22
22
  "importlib-metadata<5.0;python_version<'3.8'",
23
23
  "pre-commit>=2.21.0",
24
24
  "pytest>=7.0.0",
25
- "pytest-asyncio>=0.18.1,<0.23",
25
+ "pytest-asyncio>=0.21.2,<0.23",
26
26
  "pytest-mock>=1.10",
27
27
  "pytest-watch>=4.2",
28
28
  "pytest-xdist>=1.29",
@@ -51,7 +51,7 @@ with open("./README.md") as readme:
51
51
  setup(
52
52
  name="web3",
53
53
  # *IMPORTANT*: Don't manually change the version here. Use the 'bumpversion' utility.
54
- version="6.17.2",
54
+ version="6.19.0",
55
55
  description="""web3.py""",
56
56
  long_description_content_type="text/markdown",
57
57
  long_description=long_description,
@@ -35,22 +35,37 @@ def reject_recursive_repeats(to_wrap: Callable[..., Any]) -> Callable[..., Any]:
35
35
  return wrapped
36
36
 
37
37
 
38
- def deprecated_for(replace_message: str) -> Callable[..., Any]:
38
+ def deprecate_method(
39
+ replacement_method: str = None, deprecation_msg: str = None
40
+ ) -> Callable[..., Any]:
39
41
  """
40
- Decorate a deprecated function, with info about what to use instead, like:
42
+ Decorate a deprecated function with info on its replacement method OR a clarifying
43
+ reason for the deprecation.
41
44
 
42
- @deprecated_for("to_bytes()")
43
- def toAscii(arg):
45
+ @deprecate_method("to_bytes()")
46
+ def to_ascii(arg):
47
+ ...
48
+
49
+ @deprecate_method(deprecation_msg=(
50
+ "This method is no longer supported and will be removed in the next release."
51
+ ))
52
+ def some_method(arg):
44
53
  ...
45
54
  """
55
+ if replacement_method is None and deprecation_msg is None:
56
+ raise ValueError(
57
+ "Must provide either `replacement_method` or `deprecation_msg`"
58
+ )
46
59
 
47
60
  def decorator(to_wrap: TFunc) -> TFunc:
48
61
  @functools.wraps(to_wrap)
49
62
  def wrapper(*args: Any, **kwargs: Any) -> Callable[..., Any]:
50
- warnings.warn(
51
- f"{to_wrap.__name__} is deprecated in favor of {replace_message}",
52
- category=DeprecationWarning,
63
+ msg = (
64
+ f"{to_wrap.__name__} is deprecated in favor of {replacement_method}"
65
+ if replacement_method is not None
66
+ else deprecation_msg
53
67
  )
68
+ warnings.warn(msg, category=DeprecationWarning)
54
69
  return to_wrap(*args, **kwargs)
55
70
 
56
71
  return cast(TFunc, wrapper)
@@ -28,18 +28,14 @@ _make_dag: Method[Callable[[BlockNumber], bool]] = Method(
28
28
  mungers=[default_root_munger],
29
29
  )
30
30
 
31
- make_dag = DeprecatedMethod(
32
- _make_dag, "make_dag", msg="All mining methods have been deprecated"
33
- )
31
+ make_dag = DeprecatedMethod(_make_dag, msg="All mining methods have been deprecated")
34
32
 
35
33
  _set_extra: Method[Callable[[str], bool]] = Method(
36
34
  RPC.miner_setExtra,
37
35
  mungers=[default_root_munger],
38
36
  )
39
37
 
40
- set_extra = DeprecatedMethod(
41
- _set_extra, "set_extra", msg="All mining methods have been deprecated"
42
- )
38
+ set_extra = DeprecatedMethod(_set_extra, msg="All mining methods have been deprecated")
43
39
 
44
40
  _set_etherbase: Method[Callable[[ChecksumAddress], bool]] = Method(
45
41
  RPC.miner_setEtherbase,
@@ -47,7 +43,7 @@ _set_etherbase: Method[Callable[[ChecksumAddress], bool]] = Method(
47
43
  )
48
44
 
49
45
  set_etherbase = DeprecatedMethod(
50
- _set_etherbase, "set_etherbase", msg="All mining methods have been deprecated"
46
+ _set_etherbase, msg="All mining methods have been deprecated"
51
47
  )
52
48
 
53
49
  _set_gas_price: Method[Callable[[Wei], bool]] = Method(
@@ -56,7 +52,7 @@ _set_gas_price: Method[Callable[[Wei], bool]] = Method(
56
52
  )
57
53
 
58
54
  set_gas_price = DeprecatedMethod(
59
- _set_gas_price, "set_gas_price", msg="All mining methods have been deprecated"
55
+ _set_gas_price, msg="All mining methods have been deprecated"
60
56
  )
61
57
 
62
58
  _start: Method[Callable[[int], bool]] = Method(
@@ -64,14 +60,14 @@ _start: Method[Callable[[int], bool]] = Method(
64
60
  mungers=[default_root_munger],
65
61
  )
66
62
 
67
- start = DeprecatedMethod(_start, "start", msg="All mining methods have been deprecated")
63
+ start = DeprecatedMethod(_start, msg="All mining methods have been deprecated")
68
64
 
69
65
  _stop: Method[Callable[[], bool]] = Method(
70
66
  RPC.miner_stop,
71
67
  is_property=True,
72
68
  )
73
69
 
74
- stop = DeprecatedMethod(_stop, "stop", msg="All mining methods have been deprecated")
70
+ stop = DeprecatedMethod(_stop, msg="All mining methods have been deprecated")
75
71
 
76
72
  _start_auto_dag: Method[Callable[[], bool]] = Method(
77
73
  RPC.miner_startAutoDag,
@@ -79,7 +75,7 @@ _start_auto_dag: Method[Callable[[], bool]] = Method(
79
75
  )
80
76
 
81
77
  start_auto_dag = DeprecatedMethod(
82
- _start_auto_dag, "start_auto_dag", msg="All mining methods have been deprecated"
78
+ _start_auto_dag, msg="All mining methods have been deprecated"
83
79
  )
84
80
 
85
81
  _stop_auto_dag: Method[Callable[[], bool]] = Method(
@@ -88,5 +84,5 @@ _stop_auto_dag: Method[Callable[[], bool]] = Method(
88
84
  )
89
85
 
90
86
  stop_auto_dag = DeprecatedMethod(
91
- _stop_auto_dag, "stop_auto_dag", msg="All mining methods have been deprecated"
87
+ _stop_auto_dag, msg="All mining methods have been deprecated"
92
88
  )
@@ -55,17 +55,20 @@ ACCOUNT_FOR_UNLOCK = "0x12efDc31B1a8FA1A1e756DFD8A1601055C971E13"
55
55
 
56
56
  class GoEthereumPersonalModuleTest:
57
57
  def test_personal_import_raw_key(self, w3: "Web3") -> None:
58
- actual = w3.geth.personal.import_raw_key(PRIVATE_KEY_HEX, PASSWORD)
58
+ with pytest.warns(DeprecationWarning):
59
+ actual = w3.geth.personal.import_raw_key(PRIVATE_KEY_HEX, PASSWORD)
59
60
  assert actual == ADDRESS
60
61
 
61
62
  def test_personal_list_accounts(self, w3: "Web3") -> None:
62
- accounts = w3.geth.personal.list_accounts()
63
+ with pytest.warns(DeprecationWarning):
64
+ accounts = w3.geth.personal.list_accounts()
63
65
  assert is_list_like(accounts)
64
66
  assert len(accounts) > 0
65
67
  assert all((is_checksum_address(item) for item in accounts))
66
68
 
67
69
  def test_personal_list_wallets(self, w3: "Web3") -> None:
68
- wallets = w3.geth.personal.list_wallets()
70
+ with pytest.warns(DeprecationWarning):
71
+ wallets = w3.geth.personal.list_wallets()
69
72
  assert is_list_like(wallets)
70
73
  assert len(wallets) > 0
71
74
  assert is_checksum_address(wallets[0]["accounts"][0]["address"])
@@ -76,8 +79,8 @@ class GoEthereumPersonalModuleTest:
76
79
  def test_personal_lock_account(
77
80
  self, w3: "Web3", unlockable_account_dual_type: ChecksumAddress
78
81
  ) -> None:
79
- # TODO: how do we test this better?
80
- w3.geth.personal.lock_account(unlockable_account_dual_type)
82
+ with pytest.warns(DeprecationWarning):
83
+ w3.geth.personal.lock_account(unlockable_account_dual_type)
81
84
 
82
85
  def test_personal_unlock_account_success(
83
86
  self,
@@ -85,9 +88,10 @@ class GoEthereumPersonalModuleTest:
85
88
  unlockable_account_dual_type: ChecksumAddress,
86
89
  unlockable_account_pw: str,
87
90
  ) -> None:
88
- result = w3.geth.personal.unlock_account(
89
- unlockable_account_dual_type, unlockable_account_pw
90
- )
91
+ with pytest.warns(DeprecationWarning):
92
+ result = w3.geth.personal.unlock_account(
93
+ unlockable_account_dual_type, unlockable_account_pw
94
+ )
91
95
  assert result is True
92
96
 
93
97
  def test_personal_unlock_account_failure(
@@ -99,7 +103,8 @@ class GoEthereumPersonalModuleTest:
99
103
  )
100
104
 
101
105
  def test_personal_new_account(self, w3: "Web3") -> None:
102
- new_account = w3.geth.personal.new_account(PASSWORD)
106
+ with pytest.warns(DeprecationWarning):
107
+ new_account = w3.geth.personal.new_account(PASSWORD)
103
108
  assert is_checksum_address(new_account)
104
109
 
105
110
  def test_personal_send_transaction(
@@ -118,7 +123,10 @@ class GoEthereumPersonalModuleTest:
118
123
  "value": Wei(1),
119
124
  "gasPrice": w3.to_wei(1, "gwei"),
120
125
  }
121
- txn_hash = w3.geth.personal.send_transaction(txn_params, unlockable_account_pw)
126
+ with pytest.warns(DeprecationWarning):
127
+ txn_hash = w3.geth.personal.send_transaction(
128
+ txn_params, unlockable_account_pw
129
+ )
122
130
  assert txn_hash
123
131
  transaction = w3.eth.get_transaction(txn_hash)
124
132
 
@@ -139,10 +147,13 @@ class GoEthereumPersonalModuleTest:
139
147
  unlockable_account_pw: str,
140
148
  ) -> None:
141
149
  message = "test-web3-geth-personal-sign"
142
- signature = w3.geth.personal.sign(
143
- message, unlockable_account_dual_type, unlockable_account_pw
144
- )
145
- signer = w3.geth.personal.ec_recover(message, signature)
150
+ with pytest.warns(DeprecationWarning):
151
+ signature = w3.geth.personal.sign(
152
+ message, unlockable_account_dual_type, unlockable_account_pw
153
+ )
154
+
155
+ with pytest.warns(DeprecationWarning):
156
+ signer = w3.geth.personal.ec_recover(message, signature)
146
157
  assert is_same_address(signer, unlockable_account_dual_type)
147
158
 
148
159
  @pytest.mark.xfail(
@@ -193,13 +204,14 @@ class GoEthereumPersonalModuleTest:
193
204
  }
194
205
  }
195
206
  """
196
- signature = HexBytes(
197
- w3.geth.personal.sign_typed_data(
198
- json.loads(typed_message),
199
- unlockable_account_dual_type,
200
- unlockable_account_pw,
207
+ with pytest.warns(DeprecationWarning):
208
+ signature = HexBytes(
209
+ w3.geth.personal.sign_typed_data(
210
+ json.loads(typed_message),
211
+ unlockable_account_dual_type,
212
+ unlockable_account_pw,
213
+ )
201
214
  )
202
- )
203
215
 
204
216
  expected_signature = HexBytes(
205
217
  "0xc8b56aaeefd10ab4005c2455daf28d9082af661ac347cd"
@@ -219,33 +231,38 @@ class GoEthereumAsyncPersonalModuleTest:
219
231
  unlockable_account_pw: str,
220
232
  ) -> None:
221
233
  message = "This is a test"
222
- signature = await async_w3.geth.personal.sign(
223
- message, async_unlockable_account_dual_type, unlockable_account_pw
224
- )
234
+ with pytest.warns(DeprecationWarning):
235
+ signature = await async_w3.geth.personal.sign(
236
+ message, async_unlockable_account_dual_type, unlockable_account_pw
237
+ )
225
238
  address = await async_w3.geth.personal.ec_recover(message, signature)
226
239
  assert is_same_address(async_unlockable_account_dual_type, address)
227
240
 
228
241
  @pytest.mark.asyncio
229
242
  async def test_async_import_key(self, async_w3: "AsyncWeb3") -> None:
230
- address = await async_w3.geth.personal.import_raw_key(
231
- THIRD_PRIVATE_KEY_HEX, "Testing"
232
- )
243
+ with pytest.warns(DeprecationWarning):
244
+ address = await async_w3.geth.personal.import_raw_key(
245
+ THIRD_PRIVATE_KEY_HEX, "Testing"
246
+ )
233
247
  assert address is not None
234
248
 
235
249
  @pytest.mark.asyncio
236
250
  async def test_async_list_accounts(self, async_w3: "AsyncWeb3") -> None:
237
- accounts = await async_w3.geth.personal.list_accounts()
251
+ with pytest.warns(DeprecationWarning):
252
+ accounts = await async_w3.geth.personal.list_accounts()
238
253
  assert len(accounts) > 0
239
254
 
240
255
  @pytest.mark.asyncio
241
256
  async def test_async_list_wallets(self, async_w3: "AsyncWeb3") -> None:
242
- wallets = await async_w3.geth.personal.list_wallets()
257
+ with pytest.warns(DeprecationWarning):
258
+ wallets = await async_w3.geth.personal.list_wallets()
243
259
  assert isinstance(wallets[0], AttributeDict)
244
260
 
245
261
  @pytest.mark.asyncio
246
262
  async def test_async_new_account(self, async_w3: "AsyncWeb3") -> None:
247
263
  passphrase = "Create New Account"
248
- account = await async_w3.geth.personal.new_account(passphrase)
264
+ with pytest.warns(DeprecationWarning):
265
+ account = await async_w3.geth.personal.new_account(passphrase)
249
266
  assert is_checksum_address(account)
250
267
 
251
268
  @pytest.mark.asyncio
@@ -255,13 +272,16 @@ class GoEthereumAsyncPersonalModuleTest:
255
272
  async_unlockable_account_dual_type: ChecksumAddress,
256
273
  unlockable_account_pw: str,
257
274
  ) -> None:
258
- unlocked = await async_w3.geth.personal.unlock_account(
259
- async_unlockable_account_dual_type, unlockable_account_pw
260
- )
275
+ with pytest.warns(DeprecationWarning):
276
+ unlocked = await async_w3.geth.personal.unlock_account(
277
+ async_unlockable_account_dual_type, unlockable_account_pw
278
+ )
261
279
  assert unlocked is True
262
- locked = await async_w3.geth.personal.lock_account(
263
- async_unlockable_account_dual_type
264
- )
280
+
281
+ with pytest.warns(DeprecationWarning):
282
+ locked = await async_w3.geth.personal.lock_account(
283
+ async_unlockable_account_dual_type
284
+ )
265
285
  assert locked is True
266
286
 
267
287
  @pytest.mark.asyncio
@@ -275,9 +295,10 @@ class GoEthereumAsyncPersonalModuleTest:
275
295
  tx_params["to"] = async_unlockable_account_dual_type
276
296
  tx_params["from"] = async_unlockable_account_dual_type
277
297
  tx_params["value"] = Wei(123)
278
- response = await async_w3.geth.personal.send_transaction(
279
- tx_params, unlockable_account_pw
280
- )
298
+ with pytest.warns(DeprecationWarning):
299
+ response = await async_w3.geth.personal.send_transaction(
300
+ tx_params, unlockable_account_pw
301
+ )
281
302
  assert response is not None
282
303
 
283
304
  @pytest.mark.xfail(
@@ -291,10 +312,12 @@ class GoEthereumAsyncPersonalModuleTest:
291
312
  unlockable_account_pw: str,
292
313
  ) -> None:
293
314
  message = {"message": "This is a test"}
294
- signature = await async_w3.geth.personal.sign_typed_data(
295
- message, async_unlockable_account_dual_type, unlockable_account_pw
296
- )
297
- address = await async_w3.geth.personal.ec_recover(
298
- json.dumps(message), signature
299
- )
315
+ with pytest.warns(DeprecationWarning):
316
+ signature = await async_w3.geth.personal.sign_typed_data(
317
+ message, async_unlockable_account_dual_type, unlockable_account_pw
318
+ )
319
+ with pytest.warns(DeprecationWarning):
320
+ address = await async_w3.geth.personal.ec_recover(
321
+ json.dumps(message), signature
322
+ )
300
323
  assert is_same_address(async_unlockable_account_dual_type, address)
@@ -193,6 +193,12 @@ class WebsocketMessageStreamMock:
193
193
  self.messages = deque(messages) if messages else deque()
194
194
  self.raise_exception = raise_exception
195
195
 
196
+ def __await__(self) -> Generator[Any, Any, "Self"]:
197
+ async def __async_init__() -> "Self":
198
+ return self
199
+
200
+ return __async_init__().__await__()
201
+
196
202
  def __aiter__(self) -> "Self":
197
203
  return self
198
204
 
@@ -205,6 +211,13 @@ class WebsocketMessageStreamMock:
205
211
 
206
212
  return self.messages.popleft()
207
213
 
214
+ @staticmethod
215
+ async def pong() -> Literal[False]:
216
+ return False
217
+
218
+ async def connect(self) -> None:
219
+ pass
220
+
208
221
  async def send(self, data: bytes) -> None:
209
222
  pass
210
223
 
@@ -57,7 +57,7 @@ from web3._utils.datatypes import (
57
57
  PropertyCheckingFactory,
58
58
  )
59
59
  from web3._utils.decorators import (
60
- deprecated_for,
60
+ deprecate_method,
61
61
  )
62
62
  from web3._utils.empty import (
63
63
  empty,
@@ -727,7 +727,7 @@ class BaseContract:
727
727
  # Public API
728
728
  #
729
729
  @combomethod
730
- @deprecated_for("encode_abi()")
730
+ @deprecate_method("encode_abi()")
731
731
  def encodeABI(
732
732
  cls,
733
733
  fn_name: str,
@@ -1,6 +1,7 @@
1
1
  import datetime
2
2
  import time
3
3
  from typing import (
4
+ TYPE_CHECKING,
4
5
  Any,
5
6
  Dict,
6
7
  Optional,
@@ -15,6 +16,9 @@ from web3.types import (
15
16
  BlockData,
16
17
  )
17
18
 
19
+ if TYPE_CHECKING:
20
+ import asyncio
21
+
18
22
 
19
23
  class Web3Exception(Exception):
20
24
  """
@@ -341,7 +345,21 @@ class BadResponseFormat(Web3Exception):
341
345
  Raised when a JSON-RPC response comes back in an unexpected format
342
346
  """
343
347
 
344
- pass
348
+
349
+ class TaskNotRunning(Web3Exception):
350
+ """
351
+ Used to signal between asyncio contexts that a task that is being awaited
352
+ is not currently running.
353
+ """
354
+
355
+ def __init__(
356
+ self, task: "asyncio.Task[Any]", message: Optional[str] = None
357
+ ) -> None:
358
+ self.task = task
359
+ if message is None:
360
+ message = f"Task {task} is not running."
361
+ self.message = message
362
+ super().__init__(message)
345
363
 
346
364
 
347
365
  class MethodUnavailable(Web3Exception):
@@ -21,6 +21,9 @@ from hexbytes.main import (
21
21
  from web3._utils.compat import (
22
22
  Protocol,
23
23
  )
24
+ from web3._utils.decorators import (
25
+ deprecate_method,
26
+ )
24
27
  from web3._utils.miner import (
25
28
  make_dag,
26
29
  set_etherbase,
@@ -35,6 +38,7 @@ from web3._utils.rpc_abi import (
35
38
  RPC,
36
39
  )
37
40
  from web3.method import (
41
+ DeprecatedMethod,
38
42
  Method,
39
43
  default_root_munger,
40
44
  )
@@ -63,6 +67,12 @@ class UnlockAccountWrapper(Protocol):
63
67
  pass
64
68
 
65
69
 
70
+ GETH_PERSONAL_DEPRECATION_MSG = (
71
+ "Geth now uses `clef` for account and key management. This method will be removed "
72
+ "in web3.py `v7`."
73
+ )
74
+
75
+
66
76
  class GethPersonal(Module):
67
77
  """
68
78
  https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-personal
@@ -70,57 +80,75 @@ class GethPersonal(Module):
70
80
 
71
81
  is_async = False
72
82
 
73
- ec_recover: Method[Callable[[str, HexStr], ChecksumAddress]] = Method(
83
+ _ec_recover: Method[Callable[[str, HexStr], ChecksumAddress]] = Method(
74
84
  RPC.personal_ecRecover,
75
85
  mungers=[default_root_munger],
76
86
  )
87
+ ec_recover = DeprecatedMethod(_ec_recover, msg=GETH_PERSONAL_DEPRECATION_MSG)
77
88
 
78
- import_raw_key: Method[Callable[[str, str], ChecksumAddress]] = Method(
89
+ _import_raw_key: Method[Callable[[str, str], ChecksumAddress]] = Method(
79
90
  RPC.personal_importRawKey,
80
91
  mungers=[default_root_munger],
81
92
  )
93
+ import_raw_key = DeprecatedMethod(
94
+ _import_raw_key, msg=GETH_PERSONAL_DEPRECATION_MSG
95
+ )
82
96
 
83
- list_accounts: Method[Callable[[], List[ChecksumAddress]]] = Method(
97
+ _list_accounts: Method[Callable[[], List[ChecksumAddress]]] = Method(
84
98
  RPC.personal_listAccounts,
85
99
  is_property=True,
86
100
  )
101
+ list_accounts = DeprecatedMethod(_list_accounts, msg=GETH_PERSONAL_DEPRECATION_MSG)
87
102
 
88
- list_wallets: Method[Callable[[], List[GethWallet]]] = Method(
103
+ _list_wallets: Method[Callable[[], List[GethWallet]]] = Method(
89
104
  RPC.personal_listWallets,
90
105
  is_property=True,
91
106
  )
107
+ list_wallets = DeprecatedMethod(_list_wallets, msg=GETH_PERSONAL_DEPRECATION_MSG)
92
108
 
93
- send_transaction: Method[Callable[[TxParams, str], HexBytes]] = Method(
109
+ _send_transaction: Method[Callable[[TxParams, str], HexBytes]] = Method(
94
110
  RPC.personal_sendTransaction,
95
111
  mungers=[default_root_munger],
96
112
  )
113
+ send_transaction = DeprecatedMethod(
114
+ _send_transaction, msg=GETH_PERSONAL_DEPRECATION_MSG
115
+ )
97
116
 
98
- sign: Method[Callable[[str, ChecksumAddress, Optional[str]], HexStr]] = Method(
117
+ _sign: Method[Callable[[str, ChecksumAddress, Optional[str]], HexStr]] = Method(
99
118
  RPC.personal_sign,
100
119
  mungers=[default_root_munger],
101
120
  )
121
+ sign = DeprecatedMethod(_sign, msg=GETH_PERSONAL_DEPRECATION_MSG)
102
122
 
103
- sign_typed_data: Method[
123
+ _sign_typed_data: Method[
104
124
  Callable[[Dict[str, Any], ChecksumAddress, str], HexStr]
105
125
  ] = Method(
106
126
  RPC.personal_signTypedData,
107
127
  mungers=[default_root_munger],
108
128
  )
129
+ sign_typed_data = DeprecatedMethod(
130
+ _sign_typed_data, msg=GETH_PERSONAL_DEPRECATION_MSG
131
+ )
109
132
 
110
- new_account: Method[Callable[[str], ChecksumAddress]] = Method(
133
+ _new_account: Method[Callable[[str], ChecksumAddress]] = Method(
111
134
  RPC.personal_newAccount,
112
135
  mungers=[default_root_munger],
113
136
  )
137
+ new_account = DeprecatedMethod(_new_account, msg=GETH_PERSONAL_DEPRECATION_MSG)
114
138
 
115
- lock_account: Method[Callable[[ChecksumAddress], bool]] = Method(
139
+ _lock_account: Method[Callable[[ChecksumAddress], bool]] = Method(
116
140
  RPC.personal_lockAccount,
117
141
  mungers=[default_root_munger],
118
142
  )
143
+ lock_account = DeprecatedMethod(_lock_account, msg=GETH_PERSONAL_DEPRECATION_MSG)
119
144
 
120
- unlock_account: Method[UnlockAccountWrapper] = Method(
145
+ _unlock_account: Method[UnlockAccountWrapper] = Method(
121
146
  RPC.personal_unlockAccount,
122
147
  mungers=[default_root_munger],
123
148
  )
149
+ unlock_account = DeprecatedMethod(
150
+ _unlock_account, msg=GETH_PERSONAL_DEPRECATION_MSG
151
+ )
124
152
 
125
153
 
126
154
  class GethTxPool(Module):
@@ -373,6 +401,7 @@ class AsyncGethPersonal(Module):
373
401
  mungers=[default_root_munger],
374
402
  )
375
403
 
404
+ @deprecate_method(deprecation_msg=GETH_PERSONAL_DEPRECATION_MSG)
376
405
  async def ec_recover(self, message: str, signature: HexStr) -> ChecksumAddress:
377
406
  return await self._ec_recover(message, signature)
378
407
 
@@ -383,6 +412,7 @@ class AsyncGethPersonal(Module):
383
412
  mungers=[default_root_munger],
384
413
  )
385
414
 
415
+ @deprecate_method(deprecation_msg=GETH_PERSONAL_DEPRECATION_MSG)
386
416
  async def import_raw_key(
387
417
  self, private_key: str, passphrase: str
388
418
  ) -> ChecksumAddress:
@@ -400,9 +430,11 @@ class AsyncGethPersonal(Module):
400
430
  is_property=True,
401
431
  )
402
432
 
433
+ @deprecate_method(deprecation_msg=GETH_PERSONAL_DEPRECATION_MSG)
403
434
  async def list_accounts(self) -> List[ChecksumAddress]:
404
435
  return await self._list_accounts()
405
436
 
437
+ @deprecate_method(deprecation_msg=GETH_PERSONAL_DEPRECATION_MSG)
406
438
  async def list_wallets(self) -> List[GethWallet]:
407
439
  return await self._list_wallets()
408
440
 
@@ -413,6 +445,7 @@ class AsyncGethPersonal(Module):
413
445
  mungers=[default_root_munger],
414
446
  )
415
447
 
448
+ @deprecate_method(deprecation_msg=GETH_PERSONAL_DEPRECATION_MSG)
416
449
  async def send_transaction(
417
450
  self, transaction: TxParams, passphrase: str
418
451
  ) -> HexBytes:
@@ -434,11 +467,13 @@ class AsyncGethPersonal(Module):
434
467
  mungers=[default_root_munger],
435
468
  )
436
469
 
470
+ @deprecate_method(deprecation_msg=GETH_PERSONAL_DEPRECATION_MSG)
437
471
  async def sign(
438
472
  self, message: str, account: ChecksumAddress, passphrase: str
439
473
  ) -> HexStr:
440
474
  return await self._sign(message, account, passphrase)
441
475
 
476
+ @deprecate_method(deprecation_msg=GETH_PERSONAL_DEPRECATION_MSG)
442
477
  async def sign_typed_data(
443
478
  self, message: Dict[str, Any], account: ChecksumAddress, passphrase: str
444
479
  ) -> HexStr:
@@ -463,12 +498,15 @@ class AsyncGethPersonal(Module):
463
498
  mungers=[default_root_munger],
464
499
  )
465
500
 
501
+ @deprecate_method(deprecation_msg=GETH_PERSONAL_DEPRECATION_MSG)
466
502
  async def new_account(self, passphrase: str) -> ChecksumAddress:
467
503
  return await self._new_account(passphrase)
468
504
 
505
+ @deprecate_method(deprecation_msg=GETH_PERSONAL_DEPRECATION_MSG)
469
506
  async def lock_account(self, account: ChecksumAddress) -> bool:
470
507
  return await self._lock_account(account)
471
508
 
509
+ @deprecate_method(deprecation_msg=GETH_PERSONAL_DEPRECATION_MSG)
472
510
  async def unlock_account(
473
511
  self, account: ChecksumAddress, passphrase: str, duration: Optional[int] = None
474
512
  ) -> bool:
@@ -573,12 +573,9 @@ class _PersistentConnectionWeb3(AsyncWeb3):
573
573
 
574
574
  # async for w3 in w3.persistent_websocket(provider)
575
575
  async def __aiter__(self) -> AsyncIterator[Self]:
576
- if not await self.provider.is_connected():
577
- await self.provider.connect()
578
-
576
+ provider = self.provider
579
577
  while True:
580
- try:
581
- yield self
582
- except Exception:
583
- # provider should handle connection / reconnection
584
- continue
578
+ await provider.connect()
579
+ yield self
580
+ provider.logger.error("Connection interrupted, attempting to reconnect...")
581
+ await provider.disconnect()