web3 7.11.0__tar.gz → 7.12.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 (363) hide show
  1. {web3-7.11.0/web3.egg-info → web3-7.12.0}/PKG-INFO +1 -1
  2. {web3-7.11.0 → web3-7.12.0}/ens/async_ens.py +2 -2
  3. {web3-7.11.0 → web3-7.12.0}/ens/ens.py +2 -2
  4. {web3-7.11.0 → web3-7.12.0}/ens/utils.py +14 -3
  5. {web3-7.11.0 → web3-7.12.0}/pyproject.toml +1 -1
  6. {web3-7.11.0 → web3-7.12.0}/setup.py +1 -1
  7. {web3-7.11.0 → web3-7.12.0}/tests/core/caching-utils/test_request_caching.py +11 -11
  8. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_init.py +2 -2
  9. {web3-7.11.0 → web3-7.12.0}/tests/core/middleware/test_eth_tester_middleware.py +1 -1
  10. {web3-7.11.0 → web3-7.12.0}/tests/core/providers/test_async_http_provider.py +0 -19
  11. {web3-7.11.0 → web3-7.12.0}/tests/core/providers/test_async_ipc_provider.py +12 -10
  12. {web3-7.11.0 → web3-7.12.0}/tests/core/providers/test_http_provider.py +1 -18
  13. {web3-7.11.0 → web3-7.12.0}/tests/core/providers/test_ipc_provider.py +0 -15
  14. {web3-7.11.0 → web3-7.12.0}/tests/core/providers/test_websocket_provider.py +29 -30
  15. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_abi.py +1 -1
  16. web3-7.12.0/tests/core/utilities/test_construct_event_filter_params.py +329 -0
  17. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_http_session_manager.py +10 -12
  18. {web3-7.11.0 → web3-7.12.0}/tests/ens/test_offchain_resolution.py +3 -3
  19. {web3-7.11.0 → web3-7.12.0}/tests/ens/test_utils.py +31 -17
  20. {web3-7.11.0 → web3-7.12.0}/tests/integration/generate_fixtures/go_ethereum.py +15 -0
  21. web3-7.12.0/tests/integration/geth-1.15.11-fixture.zip +0 -0
  22. {web3-7.11.0 → web3-7.12.0}/tests/integration/go_ethereum/conftest.py +1 -1
  23. {web3-7.11.0 → web3-7.12.0}/tests/integration/go_ethereum/test_goethereum_legacy_ws.py +5 -1
  24. {web3-7.11.0 → web3-7.12.0}/tests/integration/test_ethereum_tester.py +6 -0
  25. {web3-7.11.0 → web3-7.12.0}/web3/_utils/abi.py +24 -20
  26. {web3-7.11.0 → web3-7.12.0}/web3/_utils/batching.py +22 -68
  27. {web3-7.11.0 → web3-7.12.0}/web3/_utils/caching/request_caching_validation.py +8 -4
  28. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/ambiguous_function_contract.py +3 -3
  29. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/arrays_contract.py +3 -3
  30. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/bytes_contracts.py +5 -5
  31. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/constructor_contracts.py +7 -7
  32. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/contract_caller_tester.py +3 -3
  33. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/emitter_contract.py +3 -3
  34. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/event_contracts.py +7 -7
  35. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/extended_resolver.py +3 -3
  36. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/fallback_function_contract.py +3 -3
  37. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/function_name_tester_contract.py +3 -3
  38. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/math_contract.py +3 -3
  39. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/offchain_lookup.py +3 -3
  40. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/offchain_resolver.py +3 -3
  41. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/panic_errors_contract.py +3 -3
  42. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/payable_tester.py +3 -3
  43. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/receive_function_contracts.py +5 -5
  44. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/reflector_contracts.py +3 -3
  45. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/revert_contract.py +3 -3
  46. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/simple_resolver.py +3 -3
  47. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/storage_contract.py +3 -3
  48. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/string_contract.py +3 -3
  49. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/tuple_contracts.py +5 -5
  50. {web3-7.11.0 → web3-7.12.0}/web3/_utils/decorators.py +14 -11
  51. {web3-7.11.0 → web3-7.12.0}/web3/_utils/error_formatters_utils.py +17 -0
  52. {web3-7.11.0 → web3-7.12.0}/web3/_utils/filters.py +39 -28
  53. {web3-7.11.0 → web3-7.12.0}/web3/_utils/http_session_manager.py +18 -15
  54. {web3-7.11.0 → web3-7.12.0}/web3/_utils/method_formatters.py +19 -24
  55. {web3-7.11.0 → web3-7.12.0}/web3/_utils/module_testing/eth_module.py +107 -47
  56. {web3-7.11.0 → web3-7.12.0}/web3/_utils/module_testing/web3_module.py +78 -4
  57. {web3-7.11.0 → web3-7.12.0}/web3/_utils/validation.py +1 -1
  58. {web3-7.11.0 → web3-7.12.0}/web3/contract/utils.py +20 -35
  59. {web3-7.11.0 → web3-7.12.0}/web3/eth/async_eth.py +4 -0
  60. {web3-7.11.0 → web3-7.12.0}/web3/eth/eth.py +15 -2
  61. {web3-7.11.0 → web3-7.12.0}/web3/manager.py +105 -23
  62. {web3-7.11.0 → web3-7.12.0}/web3/method.py +17 -9
  63. {web3-7.11.0 → web3-7.12.0}/web3/providers/async_base.py +15 -1
  64. {web3-7.11.0 → web3-7.12.0}/web3/providers/base.py +18 -5
  65. {web3-7.11.0 → web3-7.12.0}/web3/providers/ipc.py +2 -4
  66. {web3-7.11.0 → web3-7.12.0}/web3/providers/legacy_websocket.py +4 -5
  67. {web3-7.11.0 → web3-7.12.0}/web3/providers/persistent/async_ipc.py +3 -1
  68. {web3-7.11.0 → web3-7.12.0}/web3/providers/persistent/persistent.py +110 -40
  69. {web3-7.11.0 → web3-7.12.0}/web3/providers/persistent/request_processor.py +34 -51
  70. {web3-7.11.0 → web3-7.12.0}/web3/providers/persistent/subscription_manager.py +13 -7
  71. {web3-7.11.0 → web3-7.12.0}/web3/providers/rpc/async_rpc.py +7 -7
  72. {web3-7.11.0 → web3-7.12.0}/web3/providers/rpc/rpc.py +6 -6
  73. {web3-7.11.0 → web3-7.12.0}/web3/utils/abi.py +1 -1
  74. {web3-7.11.0 → web3-7.12.0}/web3/utils/subscriptions.py +7 -4
  75. {web3-7.11.0 → web3-7.12.0/web3.egg-info}/PKG-INFO +1 -1
  76. {web3-7.11.0 → web3-7.12.0}/web3.egg-info/SOURCES.txt +1 -3
  77. web3-7.11.0/tests/.DS_Store +0 -0
  78. web3-7.11.0/tests/core/utilities/test_construct_event_filter_params.py +0 -103
  79. web3-7.11.0/tests/integration/.DS_Store +0 -0
  80. web3-7.11.0/tests/integration/geth-1.15.5-fixture.zip +0 -0
  81. {web3-7.11.0 → web3-7.12.0}/LICENSE +0 -0
  82. {web3-7.11.0 → web3-7.12.0}/MANIFEST.in +0 -0
  83. {web3-7.11.0 → web3-7.12.0}/README.md +0 -0
  84. {web3-7.11.0 → web3-7.12.0}/ens/__init__.py +0 -0
  85. {web3-7.11.0 → web3-7.12.0}/ens/_normalization.py +0 -0
  86. {web3-7.11.0 → web3-7.12.0}/ens/abis.py +0 -0
  87. {web3-7.11.0 → web3-7.12.0}/ens/auto.py +0 -0
  88. {web3-7.11.0 → web3-7.12.0}/ens/base_ens.py +0 -0
  89. {web3-7.11.0 → web3-7.12.0}/ens/constants.py +0 -0
  90. {web3-7.11.0 → web3-7.12.0}/ens/contract_data.py +0 -0
  91. {web3-7.11.0 → web3-7.12.0}/ens/exceptions.py +0 -0
  92. {web3-7.11.0 → web3-7.12.0}/ens/specs/nf.json +0 -0
  93. {web3-7.11.0 → web3-7.12.0}/ens/specs/normalization_spec.json +0 -0
  94. {web3-7.11.0 → web3-7.12.0}/scripts/release/test_package.py +0 -0
  95. {web3-7.11.0 → web3-7.12.0}/setup.cfg +0 -0
  96. {web3-7.11.0 → web3-7.12.0}/tests/__init__.py +0 -0
  97. {web3-7.11.0 → web3-7.12.0}/tests/beacon/test_async_beacon.py +0 -0
  98. {web3-7.11.0 → web3-7.12.0}/tests/beacon/test_beacon.py +0 -0
  99. {web3-7.11.0 → web3-7.12.0}/tests/conftest.py +0 -0
  100. {web3-7.11.0 → web3-7.12.0}/tests/core/admin-module/test_admin_addPeer.py +0 -0
  101. {web3-7.11.0 → web3-7.12.0}/tests/core/admin-module/test_admin_nodeInfo.py +0 -0
  102. {web3-7.11.0 → web3-7.12.0}/tests/core/admin-module/test_admin_peers.py +0 -0
  103. {web3-7.11.0 → web3-7.12.0}/tests/core/block-utils/test_select_method_for_block_identifier.py +0 -0
  104. {web3-7.11.0 → web3-7.12.0}/tests/core/caching-utils/test_generate_cache_key.py +0 -0
  105. {web3-7.11.0 → web3-7.12.0}/tests/core/conftest.py +0 -0
  106. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/conftest.py +0 -0
  107. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_ambiguous_events.py +0 -0
  108. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_ambiguous_functions.py +0 -0
  109. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_attributes.py +0 -0
  110. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_build_transaction.py +0 -0
  111. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_call_interface.py +0 -0
  112. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_caller_interface.py +0 -0
  113. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_class_construction.py +0 -0
  114. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_constructor.py +0 -0
  115. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_constructor_encoding.py +0 -0
  116. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_deployment.py +0 -0
  117. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_estimate_gas.py +0 -0
  118. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_events.py +0 -0
  119. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_events_build_filter.py +0 -0
  120. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_example.py +0 -0
  121. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_method_abi_decoding.py +0 -0
  122. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_method_abi_encoding.py +0 -0
  123. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_method_to_argument_matching.py +0 -0
  124. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_panic_errors.py +0 -0
  125. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_transact_interface.py +0 -0
  126. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_contract_util_functions.py +0 -0
  127. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_extracting_event_data.py +0 -0
  128. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_extracting_event_data_old.py +0 -0
  129. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/test_offchain_lookup.py +0 -0
  130. {web3-7.11.0 → web3-7.12.0}/tests/core/contracts/utils.py +0 -0
  131. {web3-7.11.0 → web3-7.12.0}/tests/core/datastructures/test_datastructures.py +0 -0
  132. {web3-7.11.0 → web3-7.12.0}/tests/core/empty-object/test_empty_object_is_falsy.py +0 -0
  133. {web3-7.11.0 → web3-7.12.0}/tests/core/eth-module/conftest.py +0 -0
  134. {web3-7.11.0 → web3-7.12.0}/tests/core/eth-module/test_accounts.py +0 -0
  135. {web3-7.11.0 → web3-7.12.0}/tests/core/eth-module/test_block_api.py +0 -0
  136. {web3-7.11.0 → web3-7.12.0}/tests/core/eth-module/test_default_account_api.py +0 -0
  137. {web3-7.11.0 → web3-7.12.0}/tests/core/eth-module/test_eth_contract.py +0 -0
  138. {web3-7.11.0 → web3-7.12.0}/tests/core/eth-module/test_eth_fee_history.py +0 -0
  139. {web3-7.11.0 → web3-7.12.0}/tests/core/eth-module/test_eth_filter.py +0 -0
  140. {web3-7.11.0 → web3-7.12.0}/tests/core/eth-module/test_eth_properties.py +0 -0
  141. {web3-7.11.0 → web3-7.12.0}/tests/core/eth-module/test_gas_pricing.py +0 -0
  142. {web3-7.11.0 → web3-7.12.0}/tests/core/eth-module/test_poa.py +0 -0
  143. {web3-7.11.0 → web3-7.12.0}/tests/core/eth-module/test_transactions.py +0 -0
  144. {web3-7.11.0 → web3-7.12.0}/tests/core/eth-tester-api/test_withdrawals.py +0 -0
  145. {web3-7.11.0 → web3-7.12.0}/tests/core/exceptions/test_exceptions.py +0 -0
  146. {web3-7.11.0 → web3-7.12.0}/tests/core/filtering/conftest.py +0 -0
  147. {web3-7.11.0 → web3-7.12.0}/tests/core/filtering/test_basic_filter_tests.py +0 -0
  148. {web3-7.11.0 → web3-7.12.0}/tests/core/filtering/test_contract_create_filter_topic_merging.py +0 -0
  149. {web3-7.11.0 → web3-7.12.0}/tests/core/filtering/test_contract_data_filters.py +0 -0
  150. {web3-7.11.0 → web3-7.12.0}/tests/core/filtering/test_contract_get_logs.py +0 -0
  151. {web3-7.11.0 → web3-7.12.0}/tests/core/filtering/test_contract_on_event_filtering.py +0 -0
  152. {web3-7.11.0 → web3-7.12.0}/tests/core/filtering/test_contract_past_event_filtering.py +0 -0
  153. {web3-7.11.0 → web3-7.12.0}/tests/core/filtering/test_contract_topic_filters.py +0 -0
  154. {web3-7.11.0 → web3-7.12.0}/tests/core/filtering/test_existing_filter_instance.py +0 -0
  155. {web3-7.11.0 → web3-7.12.0}/tests/core/filtering/test_filter_against_latest_blocks.py +0 -0
  156. {web3-7.11.0 → web3-7.12.0}/tests/core/filtering/test_filter_against_pending_transactions.py +0 -0
  157. {web3-7.11.0 → web3-7.12.0}/tests/core/filtering/test_filter_against_transaction_logs.py +0 -0
  158. {web3-7.11.0 → web3-7.12.0}/tests/core/filtering/test_filters_against_many_blocks.py +0 -0
  159. {web3-7.11.0 → web3-7.12.0}/tests/core/filtering/test_utils_functions.py +0 -0
  160. {web3-7.11.0 → web3-7.12.0}/tests/core/filtering/utils.py +0 -0
  161. {web3-7.11.0 → web3-7.12.0}/tests/core/gas-strategies/test_rpc_gas_pricing_strategies.py +0 -0
  162. {web3-7.11.0 → web3-7.12.0}/tests/core/gas-strategies/test_time_based_gas_price_strategy.py +0 -0
  163. {web3-7.11.0 → web3-7.12.0}/tests/core/manager/conftest.py +0 -0
  164. {web3-7.11.0 → web3-7.12.0}/tests/core/manager/test_default_middlewares.py +0 -0
  165. {web3-7.11.0 → web3-7.12.0}/tests/core/manager/test_middleware_can_be_stateful.py +0 -0
  166. {web3-7.11.0 → web3-7.12.0}/tests/core/manager/test_middleware_onion_api.py +0 -0
  167. {web3-7.11.0 → web3-7.12.0}/tests/core/manager/test_provider_property.py +0 -0
  168. {web3-7.11.0 → web3-7.12.0}/tests/core/manager/test_provider_request_wrapping.py +0 -0
  169. {web3-7.11.0 → web3-7.12.0}/tests/core/manager/test_response_formatters.py +0 -0
  170. {web3-7.11.0 → web3-7.12.0}/tests/core/method-class/test_method.py +0 -0
  171. {web3-7.11.0 → web3-7.12.0}/tests/core/method-class/test_result_formatters.py +0 -0
  172. {web3-7.11.0 → web3-7.12.0}/tests/core/middleware/test_attrdict_middleware.py +0 -0
  173. {web3-7.11.0 → web3-7.12.0}/tests/core/middleware/test_filter_middleware.py +0 -0
  174. {web3-7.11.0 → web3-7.12.0}/tests/core/middleware/test_formatting_middleware.py +0 -0
  175. {web3-7.11.0 → web3-7.12.0}/tests/core/middleware/test_gas_price_strategy.py +0 -0
  176. {web3-7.11.0 → web3-7.12.0}/tests/core/middleware/test_middleware.py +0 -0
  177. {web3-7.11.0 → web3-7.12.0}/tests/core/middleware/test_name_to_address_middleware.py +0 -0
  178. {web3-7.11.0 → web3-7.12.0}/tests/core/middleware/test_stalecheck.py +0 -0
  179. {web3-7.11.0 → web3-7.12.0}/tests/core/middleware/test_transaction_signing.py +0 -0
  180. {web3-7.11.0 → web3-7.12.0}/tests/core/module-class/test_module.py +0 -0
  181. {web3-7.11.0 → web3-7.12.0}/tests/core/providers/test_async_tester_provider.py +0 -0
  182. {web3-7.11.0 → web3-7.12.0}/tests/core/providers/test_auto_provider.py +0 -0
  183. {web3-7.11.0 → web3-7.12.0}/tests/core/providers/test_base_provider.py +0 -0
  184. {web3-7.11.0 → web3-7.12.0}/tests/core/providers/test_http_request_retry.py +0 -0
  185. {web3-7.11.0 → web3-7.12.0}/tests/core/providers/test_legacy_websocket_provider.py +0 -0
  186. {web3-7.11.0 → web3-7.12.0}/tests/core/providers/test_provider_init.py +0 -0
  187. {web3-7.11.0 → web3-7.12.0}/tests/core/providers/test_tester_provider.py +0 -0
  188. {web3-7.11.0 → web3-7.12.0}/tests/core/subscriptions/test_subscription_manager.py +0 -0
  189. {web3-7.11.0 → web3-7.12.0}/tests/core/subscriptions/test_subscriptions.py +0 -0
  190. {web3-7.11.0 → web3-7.12.0}/tests/core/test_library_files.py +0 -0
  191. {web3-7.11.0 → web3-7.12.0}/tests/core/testing-module/test_testing_mine.py +0 -0
  192. {web3-7.11.0 → web3-7.12.0}/tests/core/testing-module/test_testing_snapshot_and_revert.py +0 -0
  193. {web3-7.11.0 → web3-7.12.0}/tests/core/testing-module/test_testing_timeTravel.py +0 -0
  194. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/__init__.py +0 -0
  195. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/conftest.py +0 -0
  196. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_abi_filtering_by_argument_name.py +0 -0
  197. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_abi_is_encodable.py +0 -0
  198. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_abi_named_tree.py +0 -0
  199. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_address.py +0 -0
  200. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_async_transaction.py +0 -0
  201. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_attach_modules.py +0 -0
  202. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_attributedict.py +0 -0
  203. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_caching_utils.py +0 -0
  204. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_construct_event_data_set.py +0 -0
  205. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_construct_event_topics.py +0 -0
  206. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_datatypes.py +0 -0
  207. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_decorators.py +0 -0
  208. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_encoding.py +0 -0
  209. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_event_filter_builder.py +0 -0
  210. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_event_interface.py +0 -0
  211. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_fee_utils.py +0 -0
  212. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_formatters.py +0 -0
  213. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_is_predefined_block_number.py +0 -0
  214. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_is_probably_enum.py +0 -0
  215. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_is_recognized_type.py +0 -0
  216. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_math.py +0 -0
  217. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_method_formatters.py +0 -0
  218. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_prepare_transaction_replacement.py +0 -0
  219. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_select_filter_method.py +0 -0
  220. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_threads.py +0 -0
  221. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_valid_transaction_params.py +0 -0
  222. {web3-7.11.0 → web3-7.12.0}/tests/core/utilities/test_validation.py +0 -0
  223. {web3-7.11.0 → web3-7.12.0}/tests/core/web3-module/test_api.py +0 -0
  224. {web3-7.11.0 → web3-7.12.0}/tests/core/web3-module/test_attach_modules.py +0 -0
  225. {web3-7.11.0 → web3-7.12.0}/tests/core/web3-module/test_client_version.py +0 -0
  226. {web3-7.11.0 → web3-7.12.0}/tests/core/web3-module/test_conversions.py +0 -0
  227. {web3-7.11.0 → web3-7.12.0}/tests/core/web3-module/test_import_and_version.py +0 -0
  228. {web3-7.11.0 → web3-7.12.0}/tests/core/web3-module/test_keccak.py +0 -0
  229. {web3-7.11.0 → web3-7.12.0}/tests/core/web3-module/test_providers.py +0 -0
  230. {web3-7.11.0 → web3-7.12.0}/tests/core/web3-module/test_strict_bytes_type_checking.py +0 -0
  231. {web3-7.11.0 → web3-7.12.0}/tests/core/web3-module/test_web3_inheritance.py +0 -0
  232. {web3-7.11.0 → web3-7.12.0}/tests/ens/conftest.py +0 -0
  233. {web3-7.11.0 → web3-7.12.0}/tests/ens/normalization/normalization_tests.json +0 -0
  234. {web3-7.11.0 → web3-7.12.0}/tests/ens/normalization/test_normalize_name_ensip15.py +0 -0
  235. {web3-7.11.0 → web3-7.12.0}/tests/ens/test_ens.py +0 -0
  236. {web3-7.11.0 → web3-7.12.0}/tests/ens/test_get_registry.py +0 -0
  237. {web3-7.11.0 → web3-7.12.0}/tests/ens/test_get_text.py +0 -0
  238. {web3-7.11.0 → web3-7.12.0}/tests/ens/test_nameprep.py +0 -0
  239. {web3-7.11.0 → web3-7.12.0}/tests/ens/test_setup_address.py +0 -0
  240. {web3-7.11.0 → web3-7.12.0}/tests/ens/test_setup_name.py +0 -0
  241. {web3-7.11.0 → web3-7.12.0}/tests/ens/test_wildcard_resolution.py +0 -0
  242. {web3-7.11.0 → web3-7.12.0}/tests/integration/README.md +0 -0
  243. {web3-7.11.0 → web3-7.12.0}/tests/integration/common.py +0 -0
  244. {web3-7.11.0 → web3-7.12.0}/tests/integration/conftest.py +0 -0
  245. {web3-7.11.0 → web3-7.12.0}/tests/integration/generate_fixtures/common.py +0 -0
  246. {web3-7.11.0 → web3-7.12.0}/tests/integration/go_ethereum/__init__.py +0 -0
  247. {web3-7.11.0 → web3-7.12.0}/tests/integration/go_ethereum/common.py +0 -0
  248. {web3-7.11.0 → web3-7.12.0}/tests/integration/go_ethereum/test_goethereum_http.py +0 -0
  249. {web3-7.11.0 → web3-7.12.0}/tests/integration/go_ethereum/test_goethereum_ipc.py +0 -0
  250. {web3-7.11.0 → web3-7.12.0}/tests/integration/go_ethereum/test_goethereum_ws/__init__.py +0 -0
  251. {web3-7.11.0 → web3-7.12.0}/tests/integration/go_ethereum/test_goethereum_ws/conftest.py +0 -0
  252. {web3-7.11.0 → web3-7.12.0}/tests/integration/go_ethereum/test_goethereum_ws/test_async_await_w3.py +0 -0
  253. {web3-7.11.0 → web3-7.12.0}/tests/integration/go_ethereum/test_goethereum_ws/test_async_ctx_manager_w3.py +0 -0
  254. {web3-7.11.0 → web3-7.12.0}/tests/integration/go_ethereum/test_goethereum_ws/test_async_iterator_w3.py +0 -0
  255. {web3-7.11.0 → web3-7.12.0}/tests/integration/go_ethereum/utils.py +0 -0
  256. {web3-7.11.0 → web3-7.12.0}/tests/utils.py +0 -0
  257. {web3-7.11.0 → web3-7.12.0}/web3/__init__.py +0 -0
  258. {web3-7.11.0 → web3-7.12.0}/web3/_utils/__init__.py +0 -0
  259. {web3-7.11.0 → web3-7.12.0}/web3/_utils/abi_element_identifiers.py +0 -0
  260. {web3-7.11.0 → web3-7.12.0}/web3/_utils/async_caching.py +0 -0
  261. {web3-7.11.0 → web3-7.12.0}/web3/_utils/async_transactions.py +0 -0
  262. {web3-7.11.0 → web3-7.12.0}/web3/_utils/blocks.py +0 -0
  263. {web3-7.11.0 → web3-7.12.0}/web3/_utils/caching/__init__.py +0 -0
  264. {web3-7.11.0 → web3-7.12.0}/web3/_utils/caching/caching_utils.py +0 -0
  265. {web3-7.11.0 → web3-7.12.0}/web3/_utils/compat/__init__.py +0 -0
  266. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/__init__.py +0 -0
  267. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/compile_contracts.py +0 -0
  268. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/__init__.py +0 -0
  269. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contract_sources/contract_data/_custom_contract_data.py +0 -0
  270. {web3-7.11.0 → web3-7.12.0}/web3/_utils/contracts.py +0 -0
  271. {web3-7.11.0 → web3-7.12.0}/web3/_utils/datatypes.py +0 -0
  272. {web3-7.11.0 → web3-7.12.0}/web3/_utils/empty.py +0 -0
  273. {web3-7.11.0 → web3-7.12.0}/web3/_utils/encoding.py +0 -0
  274. {web3-7.11.0 → web3-7.12.0}/web3/_utils/ens.py +0 -0
  275. {web3-7.11.0 → web3-7.12.0}/web3/_utils/events.py +0 -0
  276. {web3-7.11.0 → web3-7.12.0}/web3/_utils/fee_utils.py +0 -0
  277. {web3-7.11.0 → web3-7.12.0}/web3/_utils/formatters.py +0 -0
  278. {web3-7.11.0 → web3-7.12.0}/web3/_utils/http.py +0 -0
  279. {web3-7.11.0 → web3-7.12.0}/web3/_utils/hypothesis.py +0 -0
  280. {web3-7.11.0 → web3-7.12.0}/web3/_utils/math.py +0 -0
  281. {web3-7.11.0 → web3-7.12.0}/web3/_utils/module.py +0 -0
  282. {web3-7.11.0 → web3-7.12.0}/web3/_utils/module_testing/__init__.py +0 -0
  283. {web3-7.11.0 → web3-7.12.0}/web3/_utils/module_testing/go_ethereum_admin_module.py +0 -0
  284. {web3-7.11.0 → web3-7.12.0}/web3/_utils/module_testing/go_ethereum_debug_module.py +0 -0
  285. {web3-7.11.0 → web3-7.12.0}/web3/_utils/module_testing/go_ethereum_txpool_module.py +0 -0
  286. {web3-7.11.0 → web3-7.12.0}/web3/_utils/module_testing/module_testing_utils.py +0 -0
  287. {web3-7.11.0 → web3-7.12.0}/web3/_utils/module_testing/net_module.py +0 -0
  288. {web3-7.11.0 → web3-7.12.0}/web3/_utils/module_testing/persistent_connection_provider.py +0 -0
  289. {web3-7.11.0 → web3-7.12.0}/web3/_utils/module_testing/utils.py +0 -0
  290. {web3-7.11.0 → web3-7.12.0}/web3/_utils/normalizers.py +0 -0
  291. {web3-7.11.0 → web3-7.12.0}/web3/_utils/rpc_abi.py +0 -0
  292. {web3-7.11.0 → web3-7.12.0}/web3/_utils/threads.py +0 -0
  293. {web3-7.11.0 → web3-7.12.0}/web3/_utils/transactions.py +0 -0
  294. {web3-7.11.0 → web3-7.12.0}/web3/_utils/type_conversion.py +0 -0
  295. {web3-7.11.0 → web3-7.12.0}/web3/_utils/utility_methods.py +0 -0
  296. {web3-7.11.0 → web3-7.12.0}/web3/_utils/windows.py +0 -0
  297. {web3-7.11.0 → web3-7.12.0}/web3/auto/__init__.py +0 -0
  298. {web3-7.11.0 → web3-7.12.0}/web3/auto/gethdev.py +0 -0
  299. {web3-7.11.0 → web3-7.12.0}/web3/beacon/__init__.py +0 -0
  300. {web3-7.11.0 → web3-7.12.0}/web3/beacon/api_endpoints.py +0 -0
  301. {web3-7.11.0 → web3-7.12.0}/web3/beacon/async_beacon.py +0 -0
  302. {web3-7.11.0 → web3-7.12.0}/web3/beacon/beacon.py +0 -0
  303. {web3-7.11.0 → web3-7.12.0}/web3/constants.py +0 -0
  304. {web3-7.11.0 → web3-7.12.0}/web3/contract/__init__.py +0 -0
  305. {web3-7.11.0 → web3-7.12.0}/web3/contract/async_contract.py +0 -0
  306. {web3-7.11.0 → web3-7.12.0}/web3/contract/base_contract.py +0 -0
  307. {web3-7.11.0 → web3-7.12.0}/web3/contract/contract.py +0 -0
  308. {web3-7.11.0 → web3-7.12.0}/web3/datastructures.py +0 -0
  309. {web3-7.11.0 → web3-7.12.0}/web3/eth/__init__.py +0 -0
  310. {web3-7.11.0 → web3-7.12.0}/web3/eth/base_eth.py +0 -0
  311. {web3-7.11.0 → web3-7.12.0}/web3/exceptions.py +0 -0
  312. {web3-7.11.0 → web3-7.12.0}/web3/gas_strategies/__init__.py +0 -0
  313. {web3-7.11.0 → web3-7.12.0}/web3/gas_strategies/rpc.py +0 -0
  314. {web3-7.11.0 → web3-7.12.0}/web3/gas_strategies/time_based.py +0 -0
  315. {web3-7.11.0 → web3-7.12.0}/web3/geth.py +0 -0
  316. {web3-7.11.0 → web3-7.12.0}/web3/logs.py +0 -0
  317. {web3-7.11.0 → web3-7.12.0}/web3/main.py +0 -0
  318. {web3-7.11.0 → web3-7.12.0}/web3/middleware/__init__.py +0 -0
  319. {web3-7.11.0 → web3-7.12.0}/web3/middleware/attrdict.py +0 -0
  320. {web3-7.11.0 → web3-7.12.0}/web3/middleware/base.py +0 -0
  321. {web3-7.11.0 → web3-7.12.0}/web3/middleware/buffered_gas_estimate.py +0 -0
  322. {web3-7.11.0 → web3-7.12.0}/web3/middleware/filter.py +0 -0
  323. {web3-7.11.0 → web3-7.12.0}/web3/middleware/formatting.py +0 -0
  324. {web3-7.11.0 → web3-7.12.0}/web3/middleware/gas_price_strategy.py +0 -0
  325. {web3-7.11.0 → web3-7.12.0}/web3/middleware/names.py +0 -0
  326. {web3-7.11.0 → web3-7.12.0}/web3/middleware/proof_of_authority.py +0 -0
  327. {web3-7.11.0 → web3-7.12.0}/web3/middleware/pythonic.py +0 -0
  328. {web3-7.11.0 → web3-7.12.0}/web3/middleware/signing.py +0 -0
  329. {web3-7.11.0 → web3-7.12.0}/web3/middleware/stalecheck.py +0 -0
  330. {web3-7.11.0 → web3-7.12.0}/web3/middleware/validation.py +0 -0
  331. {web3-7.11.0 → web3-7.12.0}/web3/module.py +0 -0
  332. {web3-7.11.0 → web3-7.12.0}/web3/net.py +0 -0
  333. {web3-7.11.0 → web3-7.12.0}/web3/providers/__init__.py +0 -0
  334. {web3-7.11.0 → web3-7.12.0}/web3/providers/auto.py +0 -0
  335. {web3-7.11.0 → web3-7.12.0}/web3/providers/eth_tester/__init__.py +0 -0
  336. {web3-7.11.0 → web3-7.12.0}/web3/providers/eth_tester/defaults.py +0 -0
  337. {web3-7.11.0 → web3-7.12.0}/web3/providers/eth_tester/main.py +0 -0
  338. {web3-7.11.0 → web3-7.12.0}/web3/providers/eth_tester/middleware.py +0 -0
  339. {web3-7.11.0 → web3-7.12.0}/web3/providers/persistent/__init__.py +0 -0
  340. {web3-7.11.0 → web3-7.12.0}/web3/providers/persistent/persistent_connection.py +0 -0
  341. {web3-7.11.0 → web3-7.12.0}/web3/providers/persistent/subscription_container.py +0 -0
  342. {web3-7.11.0 → web3-7.12.0}/web3/providers/persistent/utils.py +0 -0
  343. {web3-7.11.0 → web3-7.12.0}/web3/providers/persistent/websocket.py +0 -0
  344. {web3-7.11.0 → web3-7.12.0}/web3/providers/rpc/__init__.py +0 -0
  345. {web3-7.11.0 → web3-7.12.0}/web3/providers/rpc/utils.py +0 -0
  346. {web3-7.11.0 → web3-7.12.0}/web3/py.typed +0 -0
  347. {web3-7.11.0 → web3-7.12.0}/web3/scripts/__init__.py +0 -0
  348. {web3-7.11.0 → web3-7.12.0}/web3/scripts/install_pre_releases.py +0 -0
  349. {web3-7.11.0 → web3-7.12.0}/web3/scripts/parse_pygeth_version.py +0 -0
  350. {web3-7.11.0 → web3-7.12.0}/web3/scripts/release/__init__.py +0 -0
  351. {web3-7.11.0 → web3-7.12.0}/web3/scripts/release/test_package.py +0 -0
  352. {web3-7.11.0 → web3-7.12.0}/web3/testing.py +0 -0
  353. {web3-7.11.0 → web3-7.12.0}/web3/tracing.py +0 -0
  354. {web3-7.11.0 → web3-7.12.0}/web3/types.py +0 -0
  355. {web3-7.11.0 → web3-7.12.0}/web3/utils/__init__.py +0 -0
  356. {web3-7.11.0 → web3-7.12.0}/web3/utils/address.py +0 -0
  357. {web3-7.11.0 → web3-7.12.0}/web3/utils/async_exception_handling.py +0 -0
  358. {web3-7.11.0 → web3-7.12.0}/web3/utils/caching.py +0 -0
  359. {web3-7.11.0 → web3-7.12.0}/web3/utils/exception_handling.py +0 -0
  360. {web3-7.11.0 → web3-7.12.0}/web3.egg-info/dependency_links.txt +0 -0
  361. {web3-7.11.0 → web3-7.12.0}/web3.egg-info/not-zip-safe +0 -0
  362. {web3-7.11.0 → web3-7.12.0}/web3.egg-info/requires.txt +0 -0
  363. {web3-7.11.0 → web3-7.12.0}/web3.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: web3
3
- Version: 7.11.0
3
+ Version: 7.12.0
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
@@ -57,7 +57,7 @@ from ens.utils import (
57
57
  address_in,
58
58
  address_to_reverse_domain,
59
59
  default,
60
- ens_encode_name,
60
+ dns_encode_name,
61
61
  init_async_web3,
62
62
  is_empty_name,
63
63
  is_none_or_zero_address,
@@ -500,7 +500,7 @@ class AsyncENS(BaseENS):
500
500
 
501
501
  calldata = resolver.encode_abi(*contract_func_with_args)
502
502
  contract_call_result = await resolver.caller.resolve(
503
- ens_encode_name(normal_name),
503
+ dns_encode_name(normal_name),
504
504
  calldata,
505
505
  )
506
506
  result = self._decode_ensip10_resolve_data(
@@ -56,7 +56,7 @@ from .utils import (
56
56
  address_in,
57
57
  address_to_reverse_domain,
58
58
  default,
59
- ens_encode_name,
59
+ dns_encode_name,
60
60
  init_web3,
61
61
  is_empty_name,
62
62
  is_none_or_zero_address,
@@ -482,7 +482,7 @@ class ENS(BaseENS):
482
482
 
483
483
  calldata = resolver.encode_abi(*contract_func_with_args)
484
484
  contract_call_result = resolver.caller.resolve(
485
- ens_encode_name(normal_name),
485
+ dns_encode_name(normal_name),
486
486
  calldata,
487
487
  )
488
488
  result = self._decode_ensip10_resolve_data(
@@ -13,6 +13,7 @@ from typing import (
13
13
  Union,
14
14
  cast,
15
15
  )
16
+ import warnings
16
17
 
17
18
  from eth_typing import (
18
19
  Address,
@@ -132,7 +133,7 @@ def normalize_name(name: str) -> str:
132
133
  return normalize_name_ensip15(name).as_text
133
134
 
134
135
 
135
- def ens_encode_name(name: str) -> bytes:
136
+ def dns_encode_name(name: str) -> HexBytes:
136
137
  r"""
137
138
  Encode a name according to DNS standards specified in section 3.1
138
139
  of RFC1035 with the following validations:
@@ -145,7 +146,7 @@ def ens_encode_name(name: str) -> bytes:
145
146
  :param str name: the dot-separated ENS name
146
147
  """
147
148
  if is_empty_name(name):
148
- return b"\x00"
149
+ return HexBytes(b"\x00")
149
150
 
150
151
  normalized_name = normalize_name(name)
151
152
 
@@ -163,7 +164,17 @@ def ens_encode_name(name: str) -> bytes:
163
164
  dns_prepped_labels = [to_bytes(len(label)) + label for label in labels_as_bytes]
164
165
 
165
166
  # return the joined prepped labels in order and append the zero byte at the end:
166
- return b"".join(dns_prepped_labels) + b"\x00"
167
+ return HexBytes(b"".join(dns_prepped_labels) + b"\x00")
168
+
169
+
170
+ def ens_encode_name(name: str) -> bytes:
171
+ warnings.warn(
172
+ "``ens_encode_name`` is deprecated and will be removed in the next "
173
+ "major version. Use ``dns_encode_name`` instead.",
174
+ DeprecationWarning,
175
+ stacklevel=2,
176
+ )
177
+ return bytes(dns_encode_name(name))
167
178
 
168
179
 
169
180
  def is_valid_name(name: str) -> bool:
@@ -127,7 +127,7 @@ name = "Removals"
127
127
  showcontent = true
128
128
 
129
129
  [tool.bumpversion]
130
- current_version = "7.11.0"
130
+ current_version = "7.12.0"
131
131
  parse = """
132
132
  (?P<major>\\d+)
133
133
  \\.(?P<minor>\\d+)
@@ -55,7 +55,7 @@ with open("./README.md") as readme:
55
55
  setup(
56
56
  name="web3",
57
57
  # *IMPORTANT*: Don't manually change the version here. See Contributing docs for the release process.
58
- version="7.11.0",
58
+ version="7.12.0",
59
59
  description="""web3: A Python library for interacting with Ethereum""",
60
60
  long_description=long_description,
61
61
  long_description_content_type="text/markdown",
@@ -204,7 +204,7 @@ def test_all_providers_do_not_cache_by_default_and_can_set_caching_properties(pr
204
204
  "threshold",
205
205
  (RequestCacheValidationThreshold.FINALIZED, RequestCacheValidationThreshold.SAFE),
206
206
  )
207
- @pytest.mark.parametrize("endpoint", BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT)
207
+ @pytest.mark.parametrize("endpoint", sorted(BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT))
208
208
  @pytest.mark.parametrize(
209
209
  "blocknum,should_cache",
210
210
  (
@@ -254,7 +254,7 @@ def test_blocknum_validation_against_validation_threshold_when_caching_mainnet(
254
254
  "threshold",
255
255
  (RequestCacheValidationThreshold.FINALIZED, RequestCacheValidationThreshold.SAFE),
256
256
  )
257
- @pytest.mark.parametrize("endpoint", BLOCKNUM_IN_PARAMS)
257
+ @pytest.mark.parametrize("endpoint", sorted(BLOCKNUM_IN_PARAMS))
258
258
  @pytest.mark.parametrize(
259
259
  "block_id,blocknum,should_cache",
260
260
  (
@@ -297,7 +297,7 @@ def test_block_id_param_caching_mainnet(
297
297
  "threshold",
298
298
  (RequestCacheValidationThreshold.FINALIZED, RequestCacheValidationThreshold.SAFE),
299
299
  )
300
- @pytest.mark.parametrize("endpoint", BLOCKHASH_IN_PARAMS)
300
+ @pytest.mark.parametrize("endpoint", sorted(BLOCKHASH_IN_PARAMS))
301
301
  @pytest.mark.parametrize(
302
302
  "blocknum,should_cache",
303
303
  (
@@ -360,7 +360,7 @@ def test_request_caching_validation_threshold_defaults(
360
360
 
361
361
 
362
362
  @pytest.mark.parametrize(
363
- "endpoint", BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS
363
+ "endpoint", sorted(BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS)
364
364
  )
365
365
  @pytest.mark.parametrize(
366
366
  "time_from_threshold,should_cache",
@@ -436,7 +436,7 @@ def test_sync_validation_against_validation_threshold_time_based(
436
436
  ),
437
437
  )
438
438
  @pytest.mark.parametrize(
439
- "endpoint", BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS
439
+ "endpoint", sorted(BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS)
440
440
  )
441
441
  def test_validation_against_validation_threshold_time_based_configured(
442
442
  time_from_threshold, should_cache, chain_id, endpoint, sync_provider, request_mocker
@@ -642,7 +642,7 @@ async def test_async_request_caching_does_not_share_state_between_providers(
642
642
  "threshold",
643
643
  (RequestCacheValidationThreshold.FINALIZED, RequestCacheValidationThreshold.SAFE),
644
644
  )
645
- @pytest.mark.parametrize("endpoint", BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT)
645
+ @pytest.mark.parametrize("endpoint", sorted(BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT))
646
646
  @pytest.mark.parametrize(
647
647
  "blocknum,should_cache",
648
648
  (
@@ -689,7 +689,7 @@ async def test_async_blocknum_validation_against_validation_threshold_mainnet(
689
689
  "threshold",
690
690
  (RequestCacheValidationThreshold.FINALIZED, RequestCacheValidationThreshold.SAFE),
691
691
  )
692
- @pytest.mark.parametrize("endpoint", BLOCKNUM_IN_PARAMS)
692
+ @pytest.mark.parametrize("endpoint", sorted(BLOCKNUM_IN_PARAMS))
693
693
  @pytest.mark.parametrize(
694
694
  "block_id,blocknum,should_cache",
695
695
  (
@@ -735,7 +735,7 @@ async def test_async_block_id_param_caching_mainnet(
735
735
  "threshold",
736
736
  (RequestCacheValidationThreshold.FINALIZED, RequestCacheValidationThreshold.SAFE),
737
737
  )
738
- @pytest.mark.parametrize("endpoint", BLOCKHASH_IN_PARAMS)
738
+ @pytest.mark.parametrize("endpoint", sorted(BLOCKHASH_IN_PARAMS))
739
739
  @pytest.mark.parametrize(
740
740
  "blocknum,should_cache",
741
741
  (
@@ -794,7 +794,7 @@ async def test_async_request_caching_validation_threshold_defaults(
794
794
 
795
795
  @pytest.mark.asyncio
796
796
  @pytest.mark.parametrize(
797
- "endpoint", BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS
797
+ "endpoint", sorted(BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS)
798
798
  )
799
799
  @pytest.mark.parametrize(
800
800
  "time_from_threshold,should_cache",
@@ -856,7 +856,7 @@ async def test_async_validation_against_validation_threshold_time_based(
856
856
 
857
857
  @pytest.mark.asyncio
858
858
  @pytest.mark.parametrize(
859
- "endpoint", BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS
859
+ "endpoint", sorted(BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS)
860
860
  )
861
861
  @pytest.mark.parametrize("blocknum", ("0x0", "0x1", "0x2", "0x3", "0x4", "0x5"))
862
862
  async def test_async_request_caching_with_validation_threshold_set_to_none(
@@ -901,7 +901,7 @@ async def test_async_request_caching_with_validation_threshold_set_to_none(
901
901
  ),
902
902
  )
903
903
  @pytest.mark.parametrize(
904
- "endpoint", BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS
904
+ "endpoint", sorted(BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS)
905
905
  )
906
906
  async def test_async_validation_against_validation_threshold_time_based_configured(
907
907
  time_from_threshold,
@@ -85,7 +85,7 @@ def test_init_multiple_contracts_performance(w3, emitter_contract_data):
85
85
  abi=emitter_contract_data["abi"], bytecode=emitter_contract_data["bytecode"]
86
86
  )
87
87
  # assert initializing 500 contracts is within a conservative / reasonable time
88
- assert (time.time() - start_time) < 1.75
88
+ assert (time.time() - start_time) < 3
89
89
 
90
90
 
91
91
  # -- async -- #
@@ -98,4 +98,4 @@ def test_async_init_multiple_contracts_performance(async_w3, emitter_contract_da
98
98
  abi=emitter_contract_data["abi"], bytecode=emitter_contract_data["bytecode"]
99
99
  )
100
100
  # assert initializing 500 contracts is within a conservative / reasonable time
101
- assert (time.time() - start_time) < 1.75
101
+ assert (time.time() - start_time) < 3
@@ -18,7 +18,7 @@ SAMPLE_ADDRESS_LIST = [
18
18
  SAMPLE_ADDRESS = "0x0000000000000000000000000000000000000004"
19
19
 
20
20
 
21
- @pytest.mark.parametrize("block_number", {0, "0x0", "earliest"})
21
+ @pytest.mark.parametrize("block_number", (0, "0x0", "earliest"))
22
22
  def test_get_transaction_count_formatters(w3, block_number):
23
23
  tx_counts = w3.eth.get_transaction_count(w3.eth.accounts[-1], block_number)
24
24
  assert tx_counts == 0
@@ -128,23 +128,4 @@ async def test_async_http_empty_batch_response(mock_async_post):
128
128
  with pytest.raises(Web3RPCError, match="empty batch"):
129
129
  await batch.async_execute()
130
130
 
131
- # assert that even though there was an error, we have reset the batching state
132
131
  assert not async_w3.provider._is_batching
133
-
134
-
135
- @patch(
136
- "web3._utils.http_session_manager.HTTPSessionManager.async_make_post_request",
137
- new_callable=AsyncMock,
138
- )
139
- @pytest.mark.asyncio
140
- async def test_async_provider_is_batching_when_make_batch_request(mock_post):
141
- def assert_is_batching_and_return_response(*_args, **_kwargs) -> bytes:
142
- assert provider._is_batching
143
- return b'{"jsonrpc":"2.0","id":1,"result":["0x1"]}'
144
-
145
- mock_post.side_effect = assert_is_batching_and_return_response
146
- provider = AsyncHTTPProvider()
147
-
148
- assert not provider._is_batching
149
- await provider.make_batch_request([("eth_blockNumber", [])])
150
- assert not provider._is_batching
@@ -374,16 +374,18 @@ async def test_persistent_connection_provider_empty_batch_response(
374
374
  simple_ipc_server,
375
375
  jsonrpc_ipc_pipe_path,
376
376
  ):
377
- async with AsyncWeb3(
378
- AsyncIPCProvider(pathlib.Path(jsonrpc_ipc_pipe_path))
379
- ) as async_w3:
380
- async_w3.provider._reader.readline = AsyncMock()
381
- async_w3.provider._reader.readline.return_value = (
382
- b'{"jsonrpc": "2.0","id":null,"error": {"code": -32600, "message": '
383
- b'"empty batch"}}\n'
384
- )
385
- async with async_w3.batch_requests() as batch:
386
- with pytest.raises(Web3RPCError, match="empty batch"):
377
+ with pytest.raises(Web3RPCError, match="empty batch"):
378
+ async with AsyncWeb3(
379
+ AsyncIPCProvider(pathlib.Path(jsonrpc_ipc_pipe_path))
380
+ ) as async_w3:
381
+ async_w3.provider._reader.readline = AsyncMock(
382
+ return_value=(
383
+ b'{"jsonrpc": "2.0","id":null,"error": {"code": -32600, "message": '
384
+ b'"empty batch"}}\n'
385
+ )
386
+ )
387
+ async with async_w3.batch_requests() as batch:
388
+ assert async_w3.provider._is_batching
387
389
  await batch.async_execute()
388
390
 
389
391
  # assert that even though there was an error, we have reset the batching state
@@ -127,26 +127,9 @@ def test_http_empty_batch_response(mock_post):
127
127
  )
128
128
  w3 = Web3(HTTPProvider())
129
129
  with w3.batch_requests() as batch:
130
+ assert w3.provider._is_batching
130
131
  with pytest.raises(Web3RPCError, match="empty batch"):
131
132
  batch.execute()
132
133
 
133
134
  # assert that even though there was an error, we have reset the batching state
134
135
  assert not w3.provider._is_batching
135
-
136
-
137
- @patch(
138
- "web3._utils.http_session_manager.HTTPSessionManager.make_post_request",
139
- new_callable=Mock,
140
- )
141
- def test_sync_provider_is_batching_when_make_batch_request(mock_post):
142
- def assert_is_batching_and_return_response(*_args, **_kwargs) -> bytes:
143
- assert provider._is_batching
144
- return b'{"jsonrpc":"2.0","id":1,"result":["0x1"]}'
145
-
146
- provider = HTTPProvider()
147
- assert not provider._is_batching
148
-
149
- mock_post.side_effect = assert_is_batching_and_return_response
150
-
151
- provider.make_batch_request([("eth_blockNumber", [])])
152
- assert not provider._is_batching
@@ -199,18 +199,3 @@ def test_ipc_provider_write_messages_end_with_new_line_delimiter(jsonrpc_ipc_pip
199
199
 
200
200
  request_data = b'{"jsonrpc": "2.0", "method": "method", "params": [], "id": 0}'
201
201
  provider._socket.sock.sendall.assert_called_with(request_data + b"\n")
202
-
203
-
204
- def test_ipc_provider_is_batching_when_make_batch_request(jsonrpc_ipc_pipe_path):
205
- def assert_is_batching_and_return_response(*_args, **_kwargs) -> bytes:
206
- assert provider._is_batching
207
- return [{"id": 0, "jsonrpc": "2.0", "result": {}}]
208
-
209
- provider = IPCProvider(pathlib.Path(jsonrpc_ipc_pipe_path), timeout=3)
210
- provider._make_request = Mock()
211
- provider._make_request.side_effect = assert_is_batching_and_return_response
212
-
213
- assert not provider._is_batching
214
-
215
- provider.make_batch_request([("eth_blockNumber", [])])
216
- assert not provider._is_batching
@@ -397,7 +397,7 @@ async def test_async_iterator_pattern_exception_handling_for_subscriptions():
397
397
 
398
398
 
399
399
  @pytest.mark.asyncio
400
- async def test_connection_closed_ok_breaks_message_iteration():
400
+ async def test_connection_closed_ok_breaks_process_subscriptions_iteration():
401
401
  with patch(
402
402
  "web3.providers.persistent.websocket.connect",
403
403
  new=lambda *_1, **_2: WebSocketMessageStreamMock(
@@ -409,6 +409,22 @@ async def test_connection_closed_ok_breaks_message_iteration():
409
409
  pytest.fail("Should not reach this point.")
410
410
 
411
411
 
412
+ @pytest.mark.asyncio
413
+ async def test_connection_closed_ok_breaks_handle_subscriptions_iteration():
414
+ with patch(
415
+ "web3.providers.persistent.websocket.connect",
416
+ new=lambda *_1, **_2: WebSocketMessageStreamMock(
417
+ raise_exception=ConnectionClosedOK(None, None)
418
+ ),
419
+ ):
420
+ w3 = await AsyncWeb3(WebSocketProvider("ws://mocked"))
421
+ # would fail with a ``TimeoutError`` if the iteration did not break properly
422
+ # on ``ConnectionClosedOK``
423
+ await asyncio.wait_for(
424
+ w3.subscription_manager.handle_subscriptions(run_forever=True), timeout=1
425
+ )
426
+
427
+
412
428
  @pytest.mark.asyncio
413
429
  async def test_listener_task_breaks_out_of_stream_when_cancelled():
414
430
  with patch(
@@ -457,19 +473,20 @@ async def test_persistent_connection_provider_empty_batch_response():
457
473
  "web3.providers.persistent.websocket.connect",
458
474
  new=lambda *_1, **_2: _mocked_ws_conn(),
459
475
  ):
460
- async with AsyncWeb3(WebSocketProvider("ws://mocked")) as async_w3:
461
- async_w3.provider._ws.recv = AsyncMock()
462
- async_w3.provider._ws.recv.return_value = (
463
- b'{"jsonrpc": "2.0","id":null,"error": {"code": -32600, "message": '
464
- b'"empty batch"}}\n'
465
- )
466
- async with async_w3.batch_requests() as batch:
467
- with pytest.raises(Web3RPCError, match="empty batch"):
476
+ with pytest.raises(Web3RPCError, match="empty batch"):
477
+ async with AsyncWeb3(WebSocketProvider("ws://mocked")) as async_w3:
478
+ async with async_w3.batch_requests() as batch:
479
+ assert async_w3.provider._is_batching
480
+ async_w3.provider._ws.recv = AsyncMock()
481
+ async_w3.provider._ws.recv.return_value = (
482
+ b'{"jsonrpc": "2.0","id":null,"error": {"code": -32600, '
483
+ b'"message": "empty batch"}}\n'
484
+ )
468
485
  await batch.async_execute()
469
486
 
470
- # assert that even though there was an error, we have reset the batching
471
- # state
472
- assert not async_w3.provider._is_batching
487
+ # assert that even though there was an error, we have reset the batching
488
+ # state
489
+ assert not async_w3.provider._is_batching
473
490
 
474
491
 
475
492
  @pytest.mark.parametrize(
@@ -548,21 +565,3 @@ async def test_raise_stray_errors_from_cache_handles_list_response_without_error
548
565
 
549
566
  # assert no errors raised
550
567
  provider._raise_stray_errors_from_cache()
551
-
552
-
553
- @pytest.mark.asyncio
554
- async def test_websocket_provider_is_batching_when_make_batch_request():
555
- def assert_is_batching_and_return_response(*_args, **_kwargs) -> bytes:
556
- assert provider._is_batching
557
- return b'{"jsonrpc":"2.0","id":1,"result":["0x1"]}'
558
-
559
- provider = WebSocketProvider("ws://mocked")
560
- _mock_ws(provider)
561
- provider._get_response_for_request_id = AsyncMock()
562
- provider._get_response_for_request_id.side_effect = (
563
- assert_is_batching_and_return_response
564
- )
565
-
566
- assert not provider._is_batching
567
- await provider.make_batch_request([("eth_blockNumber", [])])
568
- assert not provider._is_batching
@@ -829,7 +829,7 @@ def test_get_event_abi(event_name: str, input_args: Sequence[ABIComponent]) -> N
829
829
 
830
830
  with pytest.warns(
831
831
  DeprecationWarning,
832
- match="get_event_abi is deprecated in favor of get_abi_element",
832
+ match="get_event_abi is deprecated: use get_abi_element instead",
833
833
  ):
834
834
  assert (
835
835
  get_event_abi(contract_abi, event_name, input_names) == expected_event_abi