web3 7.13.0__tar.gz → 7.14.1__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 (364) hide show
  1. {web3-7.13.0/web3.egg-info → web3-7.14.1}/PKG-INFO +4 -4
  2. {web3-7.13.0 → web3-7.14.1}/ens/async_ens.py +9 -5
  3. {web3-7.13.0 → web3-7.14.1}/ens/base_ens.py +1 -1
  4. web3-7.14.1/ens/specs/.DS_Store +0 -0
  5. {web3-7.13.0 → web3-7.14.1}/ens/utils.py +2 -1
  6. {web3-7.13.0 → web3-7.14.1}/pyproject.toml +6 -2
  7. {web3-7.13.0 → web3-7.14.1}/setup.py +2 -2
  8. web3-7.14.1/tests/.DS_Store +0 -0
  9. {web3-7.13.0 → web3-7.14.1}/tests/core/caching-utils/test_generate_cache_key.py +5 -0
  10. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_call_interface.py +6 -7
  11. {web3-7.13.0 → web3-7.14.1}/tests/core/providers/test_http_provider.py +92 -0
  12. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_abi.py +3 -3
  13. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_encoding.py +5 -2
  14. {web3-7.13.0 → web3-7.14.1}/tests/core/web3-module/test_conversions.py +1 -1
  15. web3-7.14.1/tests/ens/.DS_Store +0 -0
  16. web3-7.14.1/tests/integration/.DS_Store +0 -0
  17. web3-7.14.1/tests/integration/geth-1.16.7-fixture.zip +0 -0
  18. {web3-7.13.0 → web3-7.14.1}/tests/integration/go_ethereum/conftest.py +9 -7
  19. {web3-7.13.0 → web3-7.14.1}/web3/_utils/abi.py +5 -5
  20. {web3-7.13.0 → web3-7.14.1}/web3/_utils/async_transactions.py +12 -9
  21. {web3-7.13.0 → web3-7.14.1}/web3/_utils/batching.py +1 -1
  22. {web3-7.13.0 → web3-7.14.1}/web3/_utils/caching/caching_utils.py +2 -2
  23. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contracts.py +5 -5
  24. {web3-7.13.0 → web3-7.14.1}/web3/_utils/ens.py +1 -1
  25. {web3-7.13.0 → web3-7.14.1}/web3/_utils/events.py +1 -1
  26. {web3-7.13.0 → web3-7.14.1}/web3/_utils/http_session_manager.py +7 -0
  27. {web3-7.13.0 → web3-7.14.1}/web3/_utils/module_testing/eth_module.py +133 -125
  28. {web3-7.13.0 → web3-7.14.1}/web3/_utils/module_testing/go_ethereum_admin_module.py +7 -6
  29. {web3-7.13.0 → web3-7.14.1}/web3/_utils/module_testing/go_ethereum_debug_module.py +5 -4
  30. {web3-7.13.0 → web3-7.14.1}/web3/_utils/module_testing/go_ethereum_txpool_module.py +6 -3
  31. {web3-7.13.0 → web3-7.14.1}/web3/_utils/module_testing/module_testing_utils.py +1 -1
  32. {web3-7.13.0 → web3-7.14.1}/web3/_utils/module_testing/net_module.py +4 -3
  33. {web3-7.13.0 → web3-7.14.1}/web3/_utils/module_testing/persistent_connection_provider.py +132 -20
  34. {web3-7.13.0 → web3-7.14.1}/web3/_utils/module_testing/utils.py +7 -6
  35. {web3-7.13.0 → web3-7.14.1}/web3/_utils/module_testing/web3_module.py +15 -11
  36. {web3-7.13.0 → web3-7.14.1}/web3/_utils/normalizers.py +3 -3
  37. {web3-7.13.0 → web3-7.14.1}/web3/_utils/transactions.py +2 -1
  38. {web3-7.13.0 → web3-7.14.1}/web3/beacon/async_beacon.py +1 -1
  39. {web3-7.13.0 → web3-7.14.1}/web3/contract/async_contract.py +13 -13
  40. {web3-7.13.0 → web3-7.14.1}/web3/contract/base_contract.py +11 -12
  41. {web3-7.13.0 → web3-7.14.1}/web3/contract/utils.py +7 -7
  42. {web3-7.13.0 → web3-7.14.1}/web3/eth/async_eth.py +1 -1
  43. {web3-7.13.0 → web3-7.14.1}/web3/gas_strategies/time_based.py +1 -1
  44. {web3-7.13.0 → web3-7.14.1}/web3/main.py +24 -11
  45. {web3-7.13.0 → web3-7.14.1}/web3/manager.py +9 -8
  46. {web3-7.13.0 → web3-7.14.1}/web3/middleware/__init__.py +1 -1
  47. {web3-7.13.0 → web3-7.14.1}/web3/middleware/base.py +5 -5
  48. {web3-7.13.0 → web3-7.14.1}/web3/middleware/buffered_gas_estimate.py +1 -1
  49. {web3-7.13.0 → web3-7.14.1}/web3/middleware/filter.py +10 -9
  50. {web3-7.13.0 → web3-7.14.1}/web3/middleware/formatting.py +4 -4
  51. {web3-7.13.0 → web3-7.14.1}/web3/middleware/gas_price_strategy.py +1 -1
  52. {web3-7.13.0 → web3-7.14.1}/web3/middleware/names.py +4 -4
  53. {web3-7.13.0 → web3-7.14.1}/web3/middleware/signing.py +3 -3
  54. {web3-7.13.0 → web3-7.14.1}/web3/middleware/stalecheck.py +2 -2
  55. {web3-7.13.0 → web3-7.14.1}/web3/middleware/validation.py +2 -2
  56. {web3-7.13.0 → web3-7.14.1}/web3/module.py +3 -3
  57. {web3-7.13.0 → web3-7.14.1}/web3/providers/async_base.py +2 -2
  58. {web3-7.13.0 → web3-7.14.1}/web3/providers/base.py +2 -2
  59. {web3-7.13.0 → web3-7.14.1}/web3/providers/eth_tester/defaults.py +2 -2
  60. {web3-7.13.0 → web3-7.14.1}/web3/providers/eth_tester/main.py +1 -1
  61. {web3-7.13.0 → web3-7.14.1}/web3/providers/eth_tester/middleware.py +2 -2
  62. {web3-7.13.0 → web3-7.14.1}/web3/providers/persistent/persistent.py +4 -4
  63. {web3-7.13.0 → web3-7.14.1}/web3/providers/persistent/persistent_connection.py +1 -1
  64. {web3-7.13.0 → web3-7.14.1}/web3/providers/persistent/subscription_manager.py +1 -1
  65. {web3-7.13.0 → web3-7.14.1}/web3/providers/persistent/utils.py +1 -1
  66. {web3-7.13.0 → web3-7.14.1}/web3/providers/rpc/rpc.py +3 -6
  67. {web3-7.13.0 → web3-7.14.1}/web3/types.py +18 -5
  68. {web3-7.13.0 → web3-7.14.1}/web3/utils/subscriptions.py +3 -2
  69. {web3-7.13.0 → web3-7.14.1/web3.egg-info}/PKG-INFO +4 -4
  70. {web3-7.13.0 → web3-7.14.1}/web3.egg-info/SOURCES.txt +5 -1
  71. {web3-7.13.0 → web3-7.14.1}/web3.egg-info/requires.txt +3 -3
  72. web3-7.13.0/tests/integration/geth-1.16.2-fixture.zip +0 -0
  73. {web3-7.13.0 → web3-7.14.1}/LICENSE +0 -0
  74. {web3-7.13.0 → web3-7.14.1}/MANIFEST.in +0 -0
  75. {web3-7.13.0 → web3-7.14.1}/README.md +0 -0
  76. {web3-7.13.0 → web3-7.14.1}/ens/__init__.py +0 -0
  77. {web3-7.13.0 → web3-7.14.1}/ens/_normalization.py +0 -0
  78. {web3-7.13.0 → web3-7.14.1}/ens/abis.py +0 -0
  79. {web3-7.13.0 → web3-7.14.1}/ens/auto.py +0 -0
  80. {web3-7.13.0 → web3-7.14.1}/ens/constants.py +0 -0
  81. {web3-7.13.0 → web3-7.14.1}/ens/contract_data.py +0 -0
  82. {web3-7.13.0 → web3-7.14.1}/ens/ens.py +0 -0
  83. {web3-7.13.0 → web3-7.14.1}/ens/exceptions.py +0 -0
  84. {web3-7.13.0 → web3-7.14.1}/ens/specs/nf.json +0 -0
  85. {web3-7.13.0 → web3-7.14.1}/ens/specs/normalization_spec.json +0 -0
  86. {web3-7.13.0 → web3-7.14.1}/scripts/release/test_package.py +0 -0
  87. {web3-7.13.0 → web3-7.14.1}/setup.cfg +0 -0
  88. {web3-7.13.0 → web3-7.14.1}/tests/__init__.py +0 -0
  89. {web3-7.13.0 → web3-7.14.1}/tests/beacon/test_async_beacon.py +0 -0
  90. {web3-7.13.0 → web3-7.14.1}/tests/beacon/test_beacon.py +0 -0
  91. {web3-7.13.0 → web3-7.14.1}/tests/conftest.py +0 -0
  92. {web3-7.13.0 → web3-7.14.1}/tests/core/admin-module/test_admin_addPeer.py +0 -0
  93. {web3-7.13.0 → web3-7.14.1}/tests/core/admin-module/test_admin_nodeInfo.py +0 -0
  94. {web3-7.13.0 → web3-7.14.1}/tests/core/admin-module/test_admin_peers.py +0 -0
  95. {web3-7.13.0 → web3-7.14.1}/tests/core/block-utils/test_select_method_for_block_identifier.py +0 -0
  96. {web3-7.13.0 → web3-7.14.1}/tests/core/caching-utils/test_request_caching.py +0 -0
  97. {web3-7.13.0 → web3-7.14.1}/tests/core/conftest.py +0 -0
  98. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/conftest.py +0 -0
  99. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_ambiguous_events.py +0 -0
  100. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_ambiguous_functions.py +0 -0
  101. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_attributes.py +0 -0
  102. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_build_transaction.py +0 -0
  103. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_caller_interface.py +0 -0
  104. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_class_construction.py +0 -0
  105. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_constructor.py +0 -0
  106. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_constructor_encoding.py +0 -0
  107. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_deployment.py +0 -0
  108. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_estimate_gas.py +0 -0
  109. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_events.py +0 -0
  110. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_events_build_filter.py +0 -0
  111. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_example.py +0 -0
  112. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_init.py +0 -0
  113. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_method_abi_decoding.py +0 -0
  114. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_method_abi_encoding.py +0 -0
  115. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_method_to_argument_matching.py +0 -0
  116. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_panic_errors.py +0 -0
  117. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_transact_interface.py +0 -0
  118. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_contract_util_functions.py +0 -0
  119. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_extracting_event_data.py +0 -0
  120. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_extracting_event_data_old.py +0 -0
  121. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/test_offchain_lookup.py +0 -0
  122. {web3-7.13.0 → web3-7.14.1}/tests/core/contracts/utils.py +0 -0
  123. {web3-7.13.0 → web3-7.14.1}/tests/core/datastructures/test_datastructures.py +0 -0
  124. {web3-7.13.0 → web3-7.14.1}/tests/core/empty-object/test_empty_object_is_falsy.py +0 -0
  125. {web3-7.13.0 → web3-7.14.1}/tests/core/eth-module/conftest.py +0 -0
  126. {web3-7.13.0 → web3-7.14.1}/tests/core/eth-module/test_accounts.py +0 -0
  127. {web3-7.13.0 → web3-7.14.1}/tests/core/eth-module/test_block_api.py +0 -0
  128. {web3-7.13.0 → web3-7.14.1}/tests/core/eth-module/test_default_account_api.py +0 -0
  129. {web3-7.13.0 → web3-7.14.1}/tests/core/eth-module/test_eth_contract.py +0 -0
  130. {web3-7.13.0 → web3-7.14.1}/tests/core/eth-module/test_eth_fee_history.py +0 -0
  131. {web3-7.13.0 → web3-7.14.1}/tests/core/eth-module/test_eth_filter.py +0 -0
  132. {web3-7.13.0 → web3-7.14.1}/tests/core/eth-module/test_eth_properties.py +0 -0
  133. {web3-7.13.0 → web3-7.14.1}/tests/core/eth-module/test_gas_pricing.py +0 -0
  134. {web3-7.13.0 → web3-7.14.1}/tests/core/eth-module/test_poa.py +0 -0
  135. {web3-7.13.0 → web3-7.14.1}/tests/core/eth-module/test_transactions.py +0 -0
  136. {web3-7.13.0 → web3-7.14.1}/tests/core/eth-tester-api/test_withdrawals.py +0 -0
  137. {web3-7.13.0 → web3-7.14.1}/tests/core/exceptions/test_exceptions.py +0 -0
  138. {web3-7.13.0 → web3-7.14.1}/tests/core/filtering/conftest.py +0 -0
  139. {web3-7.13.0 → web3-7.14.1}/tests/core/filtering/test_basic_filter_tests.py +0 -0
  140. {web3-7.13.0 → web3-7.14.1}/tests/core/filtering/test_contract_create_filter_topic_merging.py +0 -0
  141. {web3-7.13.0 → web3-7.14.1}/tests/core/filtering/test_contract_data_filters.py +0 -0
  142. {web3-7.13.0 → web3-7.14.1}/tests/core/filtering/test_contract_get_logs.py +0 -0
  143. {web3-7.13.0 → web3-7.14.1}/tests/core/filtering/test_contract_on_event_filtering.py +0 -0
  144. {web3-7.13.0 → web3-7.14.1}/tests/core/filtering/test_contract_past_event_filtering.py +0 -0
  145. {web3-7.13.0 → web3-7.14.1}/tests/core/filtering/test_contract_topic_filters.py +0 -0
  146. {web3-7.13.0 → web3-7.14.1}/tests/core/filtering/test_existing_filter_instance.py +0 -0
  147. {web3-7.13.0 → web3-7.14.1}/tests/core/filtering/test_filter_against_latest_blocks.py +0 -0
  148. {web3-7.13.0 → web3-7.14.1}/tests/core/filtering/test_filter_against_pending_transactions.py +0 -0
  149. {web3-7.13.0 → web3-7.14.1}/tests/core/filtering/test_filter_against_transaction_logs.py +0 -0
  150. {web3-7.13.0 → web3-7.14.1}/tests/core/filtering/test_filters_against_many_blocks.py +0 -0
  151. {web3-7.13.0 → web3-7.14.1}/tests/core/filtering/test_utils_functions.py +0 -0
  152. {web3-7.13.0 → web3-7.14.1}/tests/core/filtering/utils.py +0 -0
  153. {web3-7.13.0 → web3-7.14.1}/tests/core/gas-strategies/test_rpc_gas_pricing_strategies.py +0 -0
  154. {web3-7.13.0 → web3-7.14.1}/tests/core/gas-strategies/test_time_based_gas_price_strategy.py +0 -0
  155. {web3-7.13.0 → web3-7.14.1}/tests/core/manager/conftest.py +0 -0
  156. {web3-7.13.0 → web3-7.14.1}/tests/core/manager/test_default_middlewares.py +0 -0
  157. {web3-7.13.0 → web3-7.14.1}/tests/core/manager/test_middleware_can_be_stateful.py +0 -0
  158. {web3-7.13.0 → web3-7.14.1}/tests/core/manager/test_middleware_onion_api.py +0 -0
  159. {web3-7.13.0 → web3-7.14.1}/tests/core/manager/test_provider_property.py +0 -0
  160. {web3-7.13.0 → web3-7.14.1}/tests/core/manager/test_provider_request_wrapping.py +0 -0
  161. {web3-7.13.0 → web3-7.14.1}/tests/core/manager/test_response_formatters.py +0 -0
  162. {web3-7.13.0 → web3-7.14.1}/tests/core/method-class/test_method.py +0 -0
  163. {web3-7.13.0 → web3-7.14.1}/tests/core/method-class/test_result_formatters.py +0 -0
  164. {web3-7.13.0 → web3-7.14.1}/tests/core/middleware/test_attrdict_middleware.py +0 -0
  165. {web3-7.13.0 → web3-7.14.1}/tests/core/middleware/test_eth_tester_middleware.py +0 -0
  166. {web3-7.13.0 → web3-7.14.1}/tests/core/middleware/test_filter_middleware.py +0 -0
  167. {web3-7.13.0 → web3-7.14.1}/tests/core/middleware/test_formatting_middleware.py +0 -0
  168. {web3-7.13.0 → web3-7.14.1}/tests/core/middleware/test_gas_price_strategy.py +0 -0
  169. {web3-7.13.0 → web3-7.14.1}/tests/core/middleware/test_middleware.py +0 -0
  170. {web3-7.13.0 → web3-7.14.1}/tests/core/middleware/test_name_to_address_middleware.py +0 -0
  171. {web3-7.13.0 → web3-7.14.1}/tests/core/middleware/test_stalecheck.py +0 -0
  172. {web3-7.13.0 → web3-7.14.1}/tests/core/middleware/test_transaction_signing.py +0 -0
  173. {web3-7.13.0 → web3-7.14.1}/tests/core/module-class/test_module.py +0 -0
  174. {web3-7.13.0 → web3-7.14.1}/tests/core/providers/test_async_http_provider.py +0 -0
  175. {web3-7.13.0 → web3-7.14.1}/tests/core/providers/test_async_ipc_provider.py +0 -0
  176. {web3-7.13.0 → web3-7.14.1}/tests/core/providers/test_async_tester_provider.py +0 -0
  177. {web3-7.13.0 → web3-7.14.1}/tests/core/providers/test_auto_provider.py +0 -0
  178. {web3-7.13.0 → web3-7.14.1}/tests/core/providers/test_base_provider.py +0 -0
  179. {web3-7.13.0 → web3-7.14.1}/tests/core/providers/test_http_request_retry.py +0 -0
  180. {web3-7.13.0 → web3-7.14.1}/tests/core/providers/test_ipc_provider.py +0 -0
  181. {web3-7.13.0 → web3-7.14.1}/tests/core/providers/test_legacy_websocket_provider.py +0 -0
  182. {web3-7.13.0 → web3-7.14.1}/tests/core/providers/test_provider_init.py +0 -0
  183. {web3-7.13.0 → web3-7.14.1}/tests/core/providers/test_tester_provider.py +0 -0
  184. {web3-7.13.0 → web3-7.14.1}/tests/core/providers/test_websocket_provider.py +0 -0
  185. {web3-7.13.0 → web3-7.14.1}/tests/core/subscriptions/test_subscription_manager.py +0 -0
  186. {web3-7.13.0 → web3-7.14.1}/tests/core/subscriptions/test_subscriptions.py +0 -0
  187. {web3-7.13.0 → web3-7.14.1}/tests/core/test_library_files.py +0 -0
  188. {web3-7.13.0 → web3-7.14.1}/tests/core/testing-module/test_testing_mine.py +0 -0
  189. {web3-7.13.0 → web3-7.14.1}/tests/core/testing-module/test_testing_snapshot_and_revert.py +0 -0
  190. {web3-7.13.0 → web3-7.14.1}/tests/core/testing-module/test_testing_timeTravel.py +0 -0
  191. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/__init__.py +0 -0
  192. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/conftest.py +0 -0
  193. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_abi_filtering_by_argument_name.py +0 -0
  194. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_abi_is_encodable.py +0 -0
  195. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_abi_named_tree.py +0 -0
  196. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_address.py +0 -0
  197. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_async_transaction.py +0 -0
  198. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_attach_modules.py +0 -0
  199. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_attributedict.py +0 -0
  200. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_caching_utils.py +0 -0
  201. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_construct_event_data_set.py +0 -0
  202. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_construct_event_filter_params.py +0 -0
  203. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_construct_event_topics.py +0 -0
  204. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_datatypes.py +0 -0
  205. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_decorators.py +0 -0
  206. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_event_filter_builder.py +0 -0
  207. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_event_interface.py +0 -0
  208. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_fee_utils.py +0 -0
  209. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_formatters.py +0 -0
  210. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_http_session_manager.py +0 -0
  211. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_is_predefined_block_number.py +0 -0
  212. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_is_probably_enum.py +0 -0
  213. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_is_recognized_type.py +0 -0
  214. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_math.py +0 -0
  215. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_method_formatters.py +0 -0
  216. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_prepare_transaction_replacement.py +0 -0
  217. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_select_filter_method.py +0 -0
  218. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_threads.py +0 -0
  219. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_valid_transaction_params.py +0 -0
  220. {web3-7.13.0 → web3-7.14.1}/tests/core/utilities/test_validation.py +0 -0
  221. {web3-7.13.0 → web3-7.14.1}/tests/core/web3-module/test_api.py +0 -0
  222. {web3-7.13.0 → web3-7.14.1}/tests/core/web3-module/test_attach_modules.py +0 -0
  223. {web3-7.13.0 → web3-7.14.1}/tests/core/web3-module/test_client_version.py +0 -0
  224. {web3-7.13.0 → web3-7.14.1}/tests/core/web3-module/test_import_and_version.py +0 -0
  225. {web3-7.13.0 → web3-7.14.1}/tests/core/web3-module/test_keccak.py +0 -0
  226. {web3-7.13.0 → web3-7.14.1}/tests/core/web3-module/test_providers.py +0 -0
  227. {web3-7.13.0 → web3-7.14.1}/tests/core/web3-module/test_strict_bytes_type_checking.py +0 -0
  228. {web3-7.13.0 → web3-7.14.1}/tests/core/web3-module/test_web3_inheritance.py +0 -0
  229. {web3-7.13.0 → web3-7.14.1}/tests/ens/conftest.py +0 -0
  230. {web3-7.13.0 → web3-7.14.1}/tests/ens/normalization/normalization_tests.json +0 -0
  231. {web3-7.13.0 → web3-7.14.1}/tests/ens/normalization/test_normalize_name_ensip15.py +0 -0
  232. {web3-7.13.0 → web3-7.14.1}/tests/ens/test_ens.py +0 -0
  233. {web3-7.13.0 → web3-7.14.1}/tests/ens/test_get_registry.py +0 -0
  234. {web3-7.13.0 → web3-7.14.1}/tests/ens/test_get_text.py +0 -0
  235. {web3-7.13.0 → web3-7.14.1}/tests/ens/test_nameprep.py +0 -0
  236. {web3-7.13.0 → web3-7.14.1}/tests/ens/test_offchain_resolution.py +0 -0
  237. {web3-7.13.0 → web3-7.14.1}/tests/ens/test_setup_address.py +0 -0
  238. {web3-7.13.0 → web3-7.14.1}/tests/ens/test_setup_name.py +0 -0
  239. {web3-7.13.0 → web3-7.14.1}/tests/ens/test_utils.py +0 -0
  240. {web3-7.13.0 → web3-7.14.1}/tests/ens/test_wildcard_resolution.py +0 -0
  241. {web3-7.13.0 → web3-7.14.1}/tests/integration/README.md +0 -0
  242. {web3-7.13.0 → web3-7.14.1}/tests/integration/common.py +0 -0
  243. {web3-7.13.0 → web3-7.14.1}/tests/integration/conftest.py +0 -0
  244. {web3-7.13.0 → web3-7.14.1}/tests/integration/generate_fixtures/common.py +0 -0
  245. {web3-7.13.0 → web3-7.14.1}/tests/integration/generate_fixtures/go_ethereum.py +0 -0
  246. {web3-7.13.0 → web3-7.14.1}/tests/integration/go_ethereum/__init__.py +0 -0
  247. {web3-7.13.0 → web3-7.14.1}/tests/integration/go_ethereum/common.py +0 -0
  248. {web3-7.13.0 → web3-7.14.1}/tests/integration/go_ethereum/test_goethereum_http.py +0 -0
  249. {web3-7.13.0 → web3-7.14.1}/tests/integration/go_ethereum/test_goethereum_ipc.py +0 -0
  250. {web3-7.13.0 → web3-7.14.1}/tests/integration/go_ethereum/test_goethereum_legacy_ws.py +0 -0
  251. {web3-7.13.0 → web3-7.14.1}/tests/integration/go_ethereum/test_goethereum_ws/__init__.py +0 -0
  252. {web3-7.13.0 → web3-7.14.1}/tests/integration/go_ethereum/test_goethereum_ws/conftest.py +0 -0
  253. {web3-7.13.0 → web3-7.14.1}/tests/integration/go_ethereum/test_goethereum_ws/test_async_await_w3.py +0 -0
  254. {web3-7.13.0 → web3-7.14.1}/tests/integration/go_ethereum/test_goethereum_ws/test_async_ctx_manager_w3.py +0 -0
  255. {web3-7.13.0 → web3-7.14.1}/tests/integration/go_ethereum/test_goethereum_ws/test_async_iterator_w3.py +0 -0
  256. {web3-7.13.0 → web3-7.14.1}/tests/integration/go_ethereum/utils.py +0 -0
  257. {web3-7.13.0 → web3-7.14.1}/tests/integration/test_ethereum_tester.py +0 -0
  258. {web3-7.13.0 → web3-7.14.1}/tests/utils.py +0 -0
  259. {web3-7.13.0 → web3-7.14.1}/web3/__init__.py +0 -0
  260. {web3-7.13.0 → web3-7.14.1}/web3/_utils/__init__.py +0 -0
  261. {web3-7.13.0 → web3-7.14.1}/web3/_utils/abi_element_identifiers.py +0 -0
  262. {web3-7.13.0 → web3-7.14.1}/web3/_utils/async_caching.py +0 -0
  263. {web3-7.13.0 → web3-7.14.1}/web3/_utils/blocks.py +0 -0
  264. {web3-7.13.0 → web3-7.14.1}/web3/_utils/caching/__init__.py +0 -0
  265. {web3-7.13.0 → web3-7.14.1}/web3/_utils/caching/request_caching_validation.py +0 -0
  266. {web3-7.13.0 → web3-7.14.1}/web3/_utils/compat/__init__.py +0 -0
  267. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/__init__.py +0 -0
  268. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/compile_contracts.py +0 -0
  269. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/__init__.py +0 -0
  270. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/_custom_contract_data.py +0 -0
  271. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/ambiguous_function_contract.py +0 -0
  272. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/arrays_contract.py +0 -0
  273. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/bytes_contracts.py +0 -0
  274. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/constructor_contracts.py +0 -0
  275. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/contract_caller_tester.py +0 -0
  276. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/emitter_contract.py +0 -0
  277. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/event_contracts.py +0 -0
  278. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/extended_resolver.py +0 -0
  279. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/fallback_function_contract.py +0 -0
  280. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/function_name_tester_contract.py +0 -0
  281. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/math_contract.py +0 -0
  282. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/offchain_lookup.py +0 -0
  283. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/offchain_resolver.py +0 -0
  284. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/panic_errors_contract.py +0 -0
  285. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/payable_tester.py +0 -0
  286. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/receive_function_contracts.py +0 -0
  287. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/reflector_contracts.py +0 -0
  288. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/revert_contract.py +0 -0
  289. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/simple_resolver.py +0 -0
  290. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/storage_contract.py +0 -0
  291. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/string_contract.py +0 -0
  292. {web3-7.13.0 → web3-7.14.1}/web3/_utils/contract_sources/contract_data/tuple_contracts.py +0 -0
  293. {web3-7.13.0 → web3-7.14.1}/web3/_utils/datatypes.py +0 -0
  294. {web3-7.13.0 → web3-7.14.1}/web3/_utils/decorators.py +0 -0
  295. {web3-7.13.0 → web3-7.14.1}/web3/_utils/empty.py +0 -0
  296. {web3-7.13.0 → web3-7.14.1}/web3/_utils/encoding.py +0 -0
  297. {web3-7.13.0 → web3-7.14.1}/web3/_utils/error_formatters_utils.py +0 -0
  298. {web3-7.13.0 → web3-7.14.1}/web3/_utils/fee_utils.py +0 -0
  299. {web3-7.13.0 → web3-7.14.1}/web3/_utils/filters.py +0 -0
  300. {web3-7.13.0 → web3-7.14.1}/web3/_utils/formatters.py +0 -0
  301. {web3-7.13.0 → web3-7.14.1}/web3/_utils/http.py +0 -0
  302. {web3-7.13.0 → web3-7.14.1}/web3/_utils/hypothesis.py +0 -0
  303. {web3-7.13.0 → web3-7.14.1}/web3/_utils/math.py +0 -0
  304. {web3-7.13.0 → web3-7.14.1}/web3/_utils/method_formatters.py +0 -0
  305. {web3-7.13.0 → web3-7.14.1}/web3/_utils/module.py +0 -0
  306. {web3-7.13.0 → web3-7.14.1}/web3/_utils/module_testing/__init__.py +0 -0
  307. {web3-7.13.0 → web3-7.14.1}/web3/_utils/rpc_abi.py +0 -0
  308. {web3-7.13.0 → web3-7.14.1}/web3/_utils/threads.py +0 -0
  309. {web3-7.13.0 → web3-7.14.1}/web3/_utils/type_conversion.py +0 -0
  310. {web3-7.13.0 → web3-7.14.1}/web3/_utils/utility_methods.py +0 -0
  311. {web3-7.13.0 → web3-7.14.1}/web3/_utils/validation.py +0 -0
  312. {web3-7.13.0 → web3-7.14.1}/web3/_utils/windows.py +0 -0
  313. {web3-7.13.0 → web3-7.14.1}/web3/auto/__init__.py +0 -0
  314. {web3-7.13.0 → web3-7.14.1}/web3/auto/gethdev.py +0 -0
  315. {web3-7.13.0 → web3-7.14.1}/web3/beacon/__init__.py +0 -0
  316. {web3-7.13.0 → web3-7.14.1}/web3/beacon/api_endpoints.py +0 -0
  317. {web3-7.13.0 → web3-7.14.1}/web3/beacon/beacon.py +0 -0
  318. {web3-7.13.0 → web3-7.14.1}/web3/constants.py +0 -0
  319. {web3-7.13.0 → web3-7.14.1}/web3/contract/__init__.py +0 -0
  320. {web3-7.13.0 → web3-7.14.1}/web3/contract/contract.py +0 -0
  321. {web3-7.13.0 → web3-7.14.1}/web3/datastructures.py +0 -0
  322. {web3-7.13.0 → web3-7.14.1}/web3/eth/__init__.py +0 -0
  323. {web3-7.13.0 → web3-7.14.1}/web3/eth/base_eth.py +0 -0
  324. {web3-7.13.0 → web3-7.14.1}/web3/eth/eth.py +0 -0
  325. {web3-7.13.0 → web3-7.14.1}/web3/exceptions.py +0 -0
  326. {web3-7.13.0 → web3-7.14.1}/web3/gas_strategies/__init__.py +0 -0
  327. {web3-7.13.0 → web3-7.14.1}/web3/gas_strategies/rpc.py +0 -0
  328. {web3-7.13.0 → web3-7.14.1}/web3/geth.py +0 -0
  329. {web3-7.13.0 → web3-7.14.1}/web3/logs.py +0 -0
  330. {web3-7.13.0 → web3-7.14.1}/web3/method.py +0 -0
  331. {web3-7.13.0 → web3-7.14.1}/web3/middleware/attrdict.py +0 -0
  332. {web3-7.13.0 → web3-7.14.1}/web3/middleware/proof_of_authority.py +0 -0
  333. {web3-7.13.0 → web3-7.14.1}/web3/middleware/pythonic.py +0 -0
  334. {web3-7.13.0 → web3-7.14.1}/web3/net.py +0 -0
  335. {web3-7.13.0 → web3-7.14.1}/web3/providers/__init__.py +0 -0
  336. {web3-7.13.0 → web3-7.14.1}/web3/providers/auto.py +0 -0
  337. {web3-7.13.0 → web3-7.14.1}/web3/providers/eth_tester/__init__.py +0 -0
  338. {web3-7.13.0 → web3-7.14.1}/web3/providers/ipc.py +0 -0
  339. {web3-7.13.0 → web3-7.14.1}/web3/providers/legacy_websocket.py +0 -0
  340. {web3-7.13.0 → web3-7.14.1}/web3/providers/persistent/__init__.py +0 -0
  341. {web3-7.13.0 → web3-7.14.1}/web3/providers/persistent/async_ipc.py +0 -0
  342. {web3-7.13.0 → web3-7.14.1}/web3/providers/persistent/request_processor.py +0 -0
  343. {web3-7.13.0 → web3-7.14.1}/web3/providers/persistent/subscription_container.py +0 -0
  344. {web3-7.13.0 → web3-7.14.1}/web3/providers/persistent/websocket.py +0 -0
  345. {web3-7.13.0 → web3-7.14.1}/web3/providers/rpc/__init__.py +0 -0
  346. {web3-7.13.0 → web3-7.14.1}/web3/providers/rpc/async_rpc.py +0 -0
  347. {web3-7.13.0 → web3-7.14.1}/web3/providers/rpc/utils.py +0 -0
  348. {web3-7.13.0 → web3-7.14.1}/web3/py.typed +0 -0
  349. {web3-7.13.0 → web3-7.14.1}/web3/scripts/__init__.py +0 -0
  350. {web3-7.13.0 → web3-7.14.1}/web3/scripts/install_pre_releases.py +0 -0
  351. {web3-7.13.0 → web3-7.14.1}/web3/scripts/parse_pygeth_version.py +0 -0
  352. {web3-7.13.0 → web3-7.14.1}/web3/scripts/release/__init__.py +0 -0
  353. {web3-7.13.0 → web3-7.14.1}/web3/scripts/release/test_package.py +0 -0
  354. {web3-7.13.0 → web3-7.14.1}/web3/testing.py +0 -0
  355. {web3-7.13.0 → web3-7.14.1}/web3/tracing.py +0 -0
  356. {web3-7.13.0 → web3-7.14.1}/web3/utils/__init__.py +0 -0
  357. {web3-7.13.0 → web3-7.14.1}/web3/utils/abi.py +0 -0
  358. {web3-7.13.0 → web3-7.14.1}/web3/utils/address.py +0 -0
  359. {web3-7.13.0 → web3-7.14.1}/web3/utils/async_exception_handling.py +0 -0
  360. {web3-7.13.0 → web3-7.14.1}/web3/utils/caching.py +0 -0
  361. {web3-7.13.0 → web3-7.14.1}/web3/utils/exception_handling.py +0 -0
  362. {web3-7.13.0 → web3-7.14.1}/web3.egg-info/dependency_links.txt +0 -0
  363. {web3-7.13.0 → web3-7.14.1}/web3.egg-info/not-zip-safe +0 -0
  364. {web3-7.13.0 → web3-7.14.1}/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.13.0
3
+ Version: 7.14.1
4
4
  Summary: web3: A Python library for interacting with Ethereum
5
5
  Home-page: https://github.com/ethereum/web3.py
6
6
  Author: The Ethereum Foundation
@@ -37,7 +37,7 @@ Requires-Dist: websockets<16.0.0,>=10.0.0
37
37
  Requires-Dist: pyunormalize>=15.0.0
38
38
  Provides-Extra: tester
39
39
  Requires-Dist: eth-tester[py-evm]<0.14.0b1,>=0.13.0b1; extra == "tester"
40
- Requires-Dist: py-geth>=5.1.0; extra == "tester"
40
+ Requires-Dist: py-geth>=6.4.0; extra == "tester"
41
41
  Provides-Extra: dev
42
42
  Requires-Dist: build>=0.9.0; extra == "dev"
43
43
  Requires-Dist: bump_my_version>=0.19.0; extra == "dev"
@@ -60,7 +60,7 @@ Requires-Dist: tox>=4.0.0; extra == "dev"
60
60
  Requires-Dist: mypy==1.10.0; extra == "dev"
61
61
  Requires-Dist: pre-commit>=3.4.0; extra == "dev"
62
62
  Requires-Dist: eth-tester[py-evm]<0.14.0b1,>=0.13.0b1; extra == "dev"
63
- Requires-Dist: py-geth>=5.1.0; extra == "dev"
63
+ Requires-Dist: py-geth>=6.4.0; extra == "dev"
64
64
  Provides-Extra: docs
65
65
  Requires-Dist: sphinx>=6.0.0; extra == "docs"
66
66
  Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "docs"
@@ -77,7 +77,7 @@ Requires-Dist: tox>=4.0.0; extra == "test"
77
77
  Requires-Dist: mypy==1.10.0; extra == "test"
78
78
  Requires-Dist: pre-commit>=3.4.0; extra == "test"
79
79
  Requires-Dist: eth-tester[py-evm]<0.14.0b1,>=0.13.0b1; extra == "test"
80
- Requires-Dist: py-geth>=5.1.0; extra == "test"
80
+ Requires-Dist: py-geth>=6.4.0; extra == "test"
81
81
  Dynamic: author
82
82
  Dynamic: author-email
83
83
  Dynamic: classifier
@@ -72,7 +72,9 @@ if TYPE_CHECKING:
72
72
  AsyncContract,
73
73
  AsyncContractFunction,
74
74
  )
75
- from web3.main import AsyncWeb3 # noqa: F401
75
+ from web3.main import ( # noqa: F401
76
+ AsyncWeb3,
77
+ )
76
78
  from web3.middleware.base import ( # noqa: F401
77
79
  Middleware,
78
80
  )
@@ -96,12 +98,12 @@ class AsyncENS(BaseENS):
96
98
  """
97
99
 
98
100
  # mypy types
99
- w3: "AsyncWeb3"
101
+ w3: "AsyncWeb3[Any]"
100
102
 
101
103
  def __init__(
102
104
  self,
103
- provider: "AsyncBaseProvider" = None,
104
- addr: ChecksumAddress = None,
105
+ provider: Optional["AsyncBaseProvider"] = None,
106
+ addr: Optional[ChecksumAddress] = None,
105
107
  middleware: Optional[Sequence[Tuple["Middleware", str]]] = None,
106
108
  ) -> None:
107
109
  """
@@ -123,7 +125,9 @@ class AsyncENS(BaseENS):
123
125
  )
124
126
 
125
127
  @classmethod
126
- def from_web3(cls, w3: "AsyncWeb3", addr: ChecksumAddress = None) -> "AsyncENS":
128
+ def from_web3(
129
+ cls, w3: "AsyncWeb3[Any]", addr: ChecksumAddress = None
130
+ ) -> "AsyncENS":
127
131
  """
128
132
  Generate an AsyncENS instance with web3
129
133
 
@@ -38,7 +38,7 @@ if TYPE_CHECKING:
38
38
 
39
39
 
40
40
  class BaseENS:
41
- w3: Union["AsyncWeb3", "Web3"] = None
41
+ w3: Union["AsyncWeb3[Any]", "Web3"] = None
42
42
  ens: Union["Contract", "AsyncContract"] = None
43
43
  _resolver_contract: Union[Type["Contract"], Type["AsyncContract"]] = None
44
44
  _reverse_resolver_contract: Union[Type["Contract"], Type["AsyncContract"]] = None
Binary file
@@ -302,7 +302,7 @@ def is_valid_ens_name(ens_name: str) -> bool:
302
302
  def init_async_web3(
303
303
  provider: "AsyncBaseProvider" = None,
304
304
  middleware: Optional[Sequence[Tuple["Middleware", str]]] = (),
305
- ) -> "AsyncWeb3":
305
+ ) -> "AsyncWeb3[Any]":
306
306
  from web3 import (
307
307
  AsyncWeb3 as AsyncWeb3Main,
308
308
  )
@@ -327,6 +327,7 @@ def init_async_web3(
327
327
  )
328
328
  )
329
329
 
330
+ async_w3: "AsyncWeb3[Any]"
330
331
  if provider is default:
331
332
  async_w3 = AsyncWeb3Main(
332
333
  middleware=middleware, ens=None, modules={"eth": (AsyncEthMain)}
@@ -15,7 +15,7 @@ multi_line_output = 3
15
15
  profile = "black"
16
16
  use_parentheses = true
17
17
  # skip `__init__.py` files because sometimes order of initialization is important
18
- skip="__init__.py,web3/main.py,web3/utils/windows.py"
18
+ skip="__init__.py,web3/main.py,web3/_utils/windows.py"
19
19
 
20
20
  [tool.mypy]
21
21
  check_untyped_defs = true
@@ -33,6 +33,10 @@ warn_return_any = false
33
33
  warn_unused_configs = true
34
34
  warn_unused_ignores = true
35
35
 
36
+ [[tool.mypy.overrides]]
37
+ module = "sphinx.*"
38
+ follow_imports = "skip"
39
+
36
40
  [tool.pydocstyle]
37
41
  # All error codes found here:
38
42
  # http://www.pydocstyle.org/en/3.0.0/error_codes.html
@@ -127,7 +131,7 @@ name = "Removals"
127
131
  showcontent = true
128
132
 
129
133
  [tool.bumpversion]
130
- current_version = "7.13.0"
134
+ current_version = "7.14.1"
131
135
  parse = """
132
136
  (?P<major>\\d+)
133
137
  \\.(?P<minor>\\d+)
@@ -9,7 +9,7 @@ extras_require = {
9
9
  # Note: ethereum-maintained libraries in this list should be added to the
10
10
  # `install_pre_releases.py` script.
11
11
  "eth-tester[py-evm]>=0.13.0b1,<0.14.0b1",
12
- "py-geth>=5.1.0",
12
+ "py-geth>=6.4.0",
13
13
  ],
14
14
  "dev": [
15
15
  "build>=0.9.0",
@@ -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.13.0",
58
+ version="7.14.1",
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",
Binary file
@@ -4,7 +4,9 @@ from eth_utils import (
4
4
  to_dict,
5
5
  )
6
6
  from hypothesis import (
7
+ HealthCheck,
7
8
  given,
9
+ settings,
8
10
  strategies as st,
9
11
  )
10
12
 
@@ -42,6 +44,9 @@ def recursive_shuffle_dict(v):
42
44
  return v
43
45
 
44
46
 
47
+ # Generating data for the `all_st` strategy can be slow, so we disable the
48
+ # "too_slow" health check for this test.
49
+ @settings(suppress_health_check=[HealthCheck.too_slow])
45
50
  @given(value=all_st)
46
51
  def test_key_generation_is_deterministic(value):
47
52
  left = recursive_shuffle_dict(value)
@@ -238,8 +238,8 @@ def test_call_get_byte_array_non_strict(non_strict_arrays_contract, call):
238
238
  "args,expected",
239
239
  [
240
240
  ([b"1"], [b"1"]),
241
- (["0xDe"], [b"\xDe"]),
242
- (["0xDe", "0xDe"], [b"\xDe", b"\xDe"]),
241
+ (["0xDe"], [b"\xde"]),
242
+ (["0xDe", "0xDe"], [b"\xde", b"\xde"]),
243
243
  ],
244
244
  )
245
245
  def test_set_byte_array(arrays_contract, call, transact, args, expected):
@@ -257,8 +257,8 @@ def test_set_byte_array(arrays_contract, call, transact, args, expected):
257
257
  "args,expected",
258
258
  [
259
259
  ([b"1"], [b"1"]),
260
- (["0xDe"], [b"\xDe"]),
261
- (["0xDe", "0xDe"], [b"\xDe", b"\xDe"]),
260
+ (["0xDe"], [b"\xde"]),
261
+ (["0xDe", "0xDe"], [b"\xde", b"\xde"]),
262
262
  ],
263
263
  )
264
264
  def test_set_byte_array_non_strict(
@@ -1334,8 +1334,7 @@ async def async_mismatched_math_contract(
1334
1334
  return _mismatched_math_contract
1335
1335
 
1336
1336
 
1337
- @pytest.fixture
1338
- @pytest.mark.asyncio
1337
+ @pytest_asyncio.fixture
1339
1338
  async def test_async_deploy_raises_due_to_strict_byte_checking_by_default(
1340
1339
  async_w3, async_bytes_contract_factory, address_conversion_func
1341
1340
  ):
@@ -1503,7 +1502,7 @@ async def test_async_set_byte_array_non_strict(
1503
1502
 
1504
1503
 
1505
1504
  @pytest.mark.asyncio
1506
- @pytest.mark.parametrize("args,expected", [([b"1"], [b"1"]), (["0xDe"], [b"\xDe"])])
1505
+ @pytest.mark.parametrize("args,expected", [([b"1"], [b"1"]), (["0xDe"], [b"\xde"])])
1507
1506
  async def test_async_set_byte_array_strict_by_default(
1508
1507
  async_arrays_contract, async_call, async_transact, args, expected
1509
1508
  ):
@@ -1,4 +1,6 @@
1
1
  import pytest
2
+ import concurrent.futures
3
+ import threading
2
4
  from unittest.mock import (
3
5
  Mock,
4
6
  patch,
@@ -133,3 +135,93 @@ def test_http_empty_batch_response(mock_post):
133
135
 
134
136
  # assert that even though there was an error, we have reset the batching state
135
137
  assert not w3.provider._is_batching
138
+
139
+
140
+ def test_user_provided_session_shared_across_threads():
141
+ """
142
+ Test that when a user provides an explicit session to HTTPProvider,
143
+ that same session is used by ALL threads, not just the creating thread.
144
+
145
+ This is a regression test for:
146
+ https://github.com/ethereum/web3.py/issues/3789
147
+ """
148
+ shared_session = Session()
149
+ provider = HTTPProvider(endpoint_uri=URI, session=shared_session)
150
+
151
+ sessions_from_threads = []
152
+ errors = []
153
+
154
+ def get_session_from_thread():
155
+ try:
156
+ # This simulates what happens internally when a request is made
157
+ # from a different thread - it calls cache_and_return_session
158
+ session = provider._request_session_manager.cache_and_return_session(URI)
159
+ sessions_from_threads.append(session)
160
+ except Exception as e:
161
+ errors.append(e)
162
+
163
+ # Get session from main thread
164
+ main_thread_session = provider._request_session_manager.cache_and_return_session(
165
+ URI
166
+ )
167
+
168
+ # Get session from multiple different threads
169
+ with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor:
170
+ futures = [executor.submit(get_session_from_thread) for _ in range(10)]
171
+ concurrent.futures.wait(futures)
172
+
173
+ assert not errors, f"Errors occurred: {errors}"
174
+ assert len(sessions_from_threads) == 10
175
+
176
+ # The main assertion: ALL sessions should be the SAME shared session
177
+ assert main_thread_session is shared_session
178
+ for session in sessions_from_threads:
179
+ assert session is shared_session, (
180
+ "Session from different thread should be the same as the "
181
+ "explicitly provided session"
182
+ )
183
+
184
+
185
+ def test_no_explicit_session_creates_per_thread_sessions():
186
+ """
187
+ Test that when no explicit session is provided, each thread gets its own
188
+ session (the original thread-isolated behavior).
189
+ """
190
+ provider = HTTPProvider(endpoint_uri=URI)
191
+
192
+ sessions_from_threads = []
193
+
194
+ def get_session_from_thread():
195
+ session = provider._request_session_manager.cache_and_return_session(URI)
196
+ sessions_from_threads.append((threading.get_ident(), session))
197
+
198
+ # Get session from main thread
199
+ main_thread_id = threading.get_ident()
200
+ main_thread_session = provider._request_session_manager.cache_and_return_session(
201
+ URI
202
+ )
203
+
204
+ # Get sessions from different threads
205
+ with concurrent.futures.ThreadPoolExecutor(max_workers=3) as executor:
206
+ futures = [executor.submit(get_session_from_thread) for _ in range(3)]
207
+ concurrent.futures.wait(futures)
208
+
209
+ # Group sessions by thread ID
210
+ sessions_by_thread = {}
211
+ for thread_id, session in sessions_from_threads:
212
+ if thread_id not in sessions_by_thread:
213
+ sessions_by_thread[thread_id] = []
214
+ sessions_by_thread[thread_id].append(session)
215
+
216
+ # Verify thread isolation: same thread always gets the same session
217
+ for _, sessions in sessions_by_thread.items():
218
+ assert all(
219
+ s is sessions[0] for s in sessions
220
+ ), "Same thread should always get the same session"
221
+
222
+ # Verify different threads get different sessions (not the main thread's)
223
+ for thread_id, sessions in sessions_by_thread.items():
224
+ if thread_id != main_thread_id:
225
+ assert (
226
+ sessions[0] is not main_thread_session
227
+ ), "Different threads should have different sessions"
@@ -249,8 +249,8 @@ def test_get_tuple_type_str_parts(
249
249
  [
250
250
  (
251
251
  ["bool[2]", "bytes"],
252
- [[True, False], b"\x00\xFF"],
253
- [("bool[2]", [("bool", True), ("bool", False)]), ("bytes", b"\x00\xFF")],
252
+ [[True, False], b"\x00\xff"],
253
+ [("bool[2]", [("bool", True), ("bool", False)]), ("bytes", b"\x00\xff")],
254
254
  ),
255
255
  (
256
256
  ["uint256[]"],
@@ -337,7 +337,7 @@ def test_map_abi_data(
337
337
 
338
338
  @pytest.mark.parametrize("arg", (6, 7, 9, 12, 20, 30))
339
339
  def test_exact_length_bytes_encoder_raises_on_non_multiples_of_8_bit_size(
340
- arg: Tuple[int, ...]
340
+ arg: Tuple[int, ...],
341
341
  ) -> None:
342
342
  with pytest.raises(Web3ValueError, match="multiple of 8"):
343
343
  _ = ExactLengthBytesEncoder(None, data_byte_size=2, value_bit_size=arg)
@@ -144,8 +144,11 @@ def test_text_if_str_on_text(val):
144
144
  ),
145
145
  (
146
146
  {
147
- "date": [datetime.datetime.utcnow(), datetime.datetime.now()],
148
- "other_date": datetime.datetime.utcnow().date(),
147
+ "date": [
148
+ datetime.datetime.now(datetime.timezone.utc),
149
+ datetime.datetime.now(),
150
+ ],
151
+ "other_date": datetime.datetime.now(datetime.timezone.utc).date(),
149
152
  },
150
153
  TypeError,
151
154
  "Could not encode to JSON: .*'other_date'.*is not JSON serializable",
@@ -159,7 +159,7 @@ def test_to_int_hexstr(val, expected):
159
159
  (b"\x01", "0x01"),
160
160
  (b"\x10", "0x10"),
161
161
  (b"\x01\x00", "0x0100"),
162
- (b"\x00\x0F", "0x000f"),
162
+ (b"\x00\x0f", "0x000f"),
163
163
  (b"", "0x"),
164
164
  (0, "0x0"),
165
165
  (1, "0x1"),
Binary file
Binary file
@@ -35,7 +35,7 @@ from .utils import (
35
35
  )
36
36
 
37
37
  KEYFILE_PW = "web3py-test"
38
- GETH_FIXTURE_ZIP = "geth-1.16.2-fixture.zip"
38
+ GETH_FIXTURE_ZIP = "geth-1.16.7-fixture.zip"
39
39
 
40
40
 
41
41
  @pytest.fixture
@@ -175,12 +175,14 @@ def start_geth_process_and_yield_port(
175
175
  bufsize=1,
176
176
  )
177
177
 
178
- port = wait_for_port(proc)
179
- yield port
180
-
181
- kill_proc_gracefully(proc)
182
- output, errors = proc.communicate(timeout=5)
183
- print("Geth Process Exited:\n" f"stdout: {output}\n\n" f"stderr: {errors}\n\n")
178
+ try:
179
+ port = wait_for_port(proc)
180
+ yield port
181
+ finally:
182
+ # Ensure cleanup happens even if test fails
183
+ kill_proc_gracefully(proc)
184
+ output, errors = proc.communicate(timeout=5)
185
+ print("Geth Process Exited:\n" f"stdout: {output}\n\n" f"stderr: {errors}\n\n")
184
186
 
185
187
 
186
188
  @pytest.fixture
@@ -852,7 +852,7 @@ def _named_subtree(
852
852
 
853
853
  def recursive_dict_to_namedtuple(data: Dict[str, Any]) -> Tuple[Any, ...]:
854
854
  def _dict_to_namedtuple(
855
- value: Union[Dict[str, Any], List[Any]]
855
+ value: Union[Dict[str, Any], List[Any]],
856
856
  ) -> Union[Tuple[Any, ...], List[Any]]:
857
857
  if not isinstance(value, dict):
858
858
  return value
@@ -864,7 +864,7 @@ def recursive_dict_to_namedtuple(data: Dict[str, Any]) -> Tuple[Any, ...]:
864
864
 
865
865
 
866
866
  def abi_decoded_namedtuple_factory(
867
- fields: Tuple[Any, ...]
867
+ fields: Tuple[Any, ...],
868
868
  ) -> Callable[..., Tuple[Any, ...]]:
869
869
  class ABIDecodedNamedTuple(namedtuple("ABIDecodedNamedTuple", fields, rename=True)): # type: ignore # noqa: E501
870
870
  def __new__(self, args: Any) -> "ABIDecodedNamedTuple":
@@ -877,9 +877,9 @@ def abi_decoded_namedtuple_factory(
877
877
 
878
878
 
879
879
  async def async_data_tree_map(
880
- async_w3: "AsyncWeb3",
880
+ async_w3: "AsyncWeb3[Any]",
881
881
  func: Callable[
882
- ["AsyncWeb3", TypeStr, Any], Coroutine[Any, Any, Tuple[TypeStr, Any]]
882
+ ["AsyncWeb3[Any]", TypeStr, Any], Coroutine[Any, Any, Tuple[TypeStr, Any]]
883
883
  ],
884
884
  data_tree: Any,
885
885
  ) -> "ABITypedData":
@@ -902,7 +902,7 @@ async def async_data_tree_map(
902
902
 
903
903
  @reject_recursive_repeats
904
904
  async def async_recursive_map(
905
- async_w3: "AsyncWeb3",
905
+ async_w3: "AsyncWeb3[Any]",
906
906
  func: Callable[[Any], Coroutine[Any, Any, TReturn]],
907
907
  data: Any,
908
908
  ) -> TReturn:
@@ -1,5 +1,6 @@
1
1
  from typing import (
2
2
  TYPE_CHECKING,
3
+ Any,
3
4
  Dict,
4
5
  Optional,
5
6
  Union,
@@ -46,13 +47,13 @@ if TYPE_CHECKING:
46
47
 
47
48
  # unused vars present in these funcs because they all need to have the same signature
48
49
  async def _estimate_gas(
49
- async_w3: "AsyncWeb3", tx: TxParams, _defaults: Dict[str, Union[bytes, int]]
50
+ async_w3: "AsyncWeb3[Any]", tx: TxParams, _defaults: Dict[str, Union[bytes, int]]
50
51
  ) -> int:
51
52
  return await async_w3.eth.estimate_gas(tx)
52
53
 
53
54
 
54
55
  async def _max_fee_per_gas(
55
- async_w3: "AsyncWeb3", tx: TxParams, defaults: Dict[str, Union[bytes, int]]
56
+ async_w3: "AsyncWeb3[Any]", tx: TxParams, defaults: Dict[str, Union[bytes, int]]
56
57
  ) -> Wei:
57
58
  block = await async_w3.eth.get_block("latest")
58
59
  max_priority_fee = tx.get(
@@ -62,13 +63,13 @@ async def _max_fee_per_gas(
62
63
 
63
64
 
64
65
  async def _max_priority_fee_gas(
65
- async_w3: "AsyncWeb3", _tx: TxParams, _defaults: Dict[str, Union[bytes, int]]
66
+ async_w3: "AsyncWeb3[Any]", _tx: TxParams, _defaults: Dict[str, Union[bytes, int]]
66
67
  ) -> Wei:
67
68
  return await async_w3.eth.max_priority_fee
68
69
 
69
70
 
70
71
  async def _chain_id(
71
- async_w3: "AsyncWeb3", _tx: TxParams, _defaults: Dict[str, Union[bytes, int]]
72
+ async_w3: "AsyncWeb3[Any]", _tx: TxParams, _defaults: Dict[str, Union[bytes, int]]
72
73
  ) -> int:
73
74
  return await async_w3.eth.chain_id
74
75
 
@@ -92,7 +93,7 @@ async def get_block_gas_limit(
92
93
 
93
94
 
94
95
  async def get_buffered_gas_estimate(
95
- async_w3: "AsyncWeb3", transaction: TxParams, gas_buffer: int = 100000
96
+ async_w3: "AsyncWeb3[Any]", transaction: TxParams, gas_buffer: int = 100000
96
97
  ) -> int:
97
98
  gas_estimate_transaction = cast(TxParams, dict(**transaction))
98
99
 
@@ -110,7 +111,9 @@ async def get_buffered_gas_estimate(
110
111
  return min(gas_limit, gas_estimate + gas_buffer)
111
112
 
112
113
 
113
- async def async_fill_nonce(async_w3: "AsyncWeb3", transaction: TxParams) -> TxParams:
114
+ async def async_fill_nonce(
115
+ async_w3: "AsyncWeb3[Any]", transaction: TxParams
116
+ ) -> TxParams:
114
117
  if "from" in transaction and "nonce" not in transaction:
115
118
  tx_count = await async_w3.eth.get_transaction_count(
116
119
  cast(ChecksumAddress, transaction["from"]),
@@ -121,7 +124,7 @@ async def async_fill_nonce(async_w3: "AsyncWeb3", transaction: TxParams) -> TxPa
121
124
 
122
125
 
123
126
  async def async_fill_transaction_defaults(
124
- async_w3: "AsyncWeb3", transaction: TxParams
127
+ async_w3: "AsyncWeb3[Any]", transaction: TxParams
125
128
  ) -> TxParams:
126
129
  """
127
130
  If async_w3 is None, fill as much as possible while offline
@@ -165,7 +168,7 @@ async def async_fill_transaction_defaults(
165
168
 
166
169
 
167
170
  async def async_get_required_transaction(
168
- async_w3: "AsyncWeb3", transaction_hash: _Hash32
171
+ async_w3: "AsyncWeb3[Any]", transaction_hash: _Hash32
169
172
  ) -> TxData:
170
173
  current_transaction = await async_w3.eth.get_transaction(transaction_hash)
171
174
  if not current_transaction:
@@ -176,7 +179,7 @@ async def async_get_required_transaction(
176
179
 
177
180
 
178
181
  async def async_replace_transaction(
179
- async_w3: "AsyncWeb3", current_transaction: TxData, new_transaction: TxParams
182
+ async_w3: "AsyncWeb3[Any]", current_transaction: TxData, new_transaction: TxParams
180
183
  ) -> HexBytes:
181
184
  new_transaction = prepare_replacement_transaction(
182
185
  async_w3, current_transaction, new_transaction
@@ -71,7 +71,7 @@ RPC_METHODS_UNSUPPORTED_DURING_BATCH = {
71
71
 
72
72
 
73
73
  class RequestBatcher(Generic[TFunc]):
74
- def __init__(self, web3: Union["AsyncWeb3", "Web3"]) -> None:
74
+ def __init__(self, web3: Union["AsyncWeb3[Any]", "Web3"]) -> None:
75
75
  self.web3 = web3
76
76
  self._requests_info: List[BatchRequestInformation] = []
77
77
  self._async_requests_info: List[
@@ -238,7 +238,7 @@ def _should_cache_response(
238
238
 
239
239
 
240
240
  def handle_request_caching(
241
- func: Callable[[SYNC_PROVIDER_TYPE, RPCEndpoint, Any], "RPCResponse"]
241
+ func: Callable[[SYNC_PROVIDER_TYPE, RPCEndpoint, Any], "RPCResponse"],
242
242
  ) -> Callable[..., "RPCResponse"]:
243
243
  def wrapper(
244
244
  provider: SYNC_PROVIDER_TYPE, method: RPCEndpoint, params: Any
@@ -401,7 +401,7 @@ def async_handle_recv_caching(
401
401
  func: Callable[
402
402
  ["PersistentConnectionProvider", "RPCRequest"],
403
403
  Coroutine[Any, Any, "RPCResponse"],
404
- ]
404
+ ],
405
405
  ) -> Callable[..., Coroutine[Any, Any, "RPCResponse"]]:
406
406
  async def wrapper(
407
407
  provider: "PersistentConnectionProvider",
@@ -121,7 +121,7 @@ def find_matching_event_abi(
121
121
 
122
122
 
123
123
  def encode_abi(
124
- w3: Union["AsyncWeb3", "Web3"],
124
+ w3: Union["AsyncWeb3[Any]", "Web3"],
125
125
  abi: ABIElement,
126
126
  arguments: Sequence[Any],
127
127
  data: Optional[HexStr] = None,
@@ -168,7 +168,7 @@ def encode_abi(
168
168
 
169
169
  def prepare_transaction(
170
170
  address: ChecksumAddress,
171
- w3: Union["AsyncWeb3", "Web3"],
171
+ w3: Union["AsyncWeb3[Any]", "Web3"],
172
172
  abi_element_identifier: ABIElementIdentifier,
173
173
  contract_abi: Optional[ABI] = None,
174
174
  abi_callable: Optional[ABICallable] = None,
@@ -232,7 +232,7 @@ def prepare_transaction(
232
232
 
233
233
 
234
234
  def encode_transaction_data(
235
- w3: Union["AsyncWeb3", "Web3"],
235
+ w3: Union["AsyncWeb3[Any]", "Web3"],
236
236
  abi_element_identifier: ABIElementIdentifier,
237
237
  contract_abi: Optional[ABI] = None,
238
238
  abi_callable: Optional[ABICallable] = None,
@@ -363,7 +363,7 @@ def parse_block_identifier_int(w3: "Web3", block_identifier_int: int) -> BlockNu
363
363
 
364
364
 
365
365
  async def async_parse_block_identifier(
366
- async_w3: "AsyncWeb3", block_identifier: BlockIdentifier
366
+ async_w3: "AsyncWeb3[Any]", block_identifier: BlockIdentifier
367
367
  ) -> BlockIdentifier:
368
368
  if block_identifier is None:
369
369
  return async_w3.eth.default_block
@@ -381,7 +381,7 @@ async def async_parse_block_identifier(
381
381
 
382
382
 
383
383
  async def async_parse_block_identifier_int(
384
- async_w3: "AsyncWeb3", block_identifier_int: int
384
+ async_w3: "AsyncWeb3[Any]", block_identifier_int: int
385
385
  ) -> BlockNumber:
386
386
  if block_identifier_int >= 0:
387
387
  block_num = block_identifier_int
@@ -75,7 +75,7 @@ class AsyncStaticENS:
75
75
 
76
76
  @contextmanager
77
77
  def ens_addresses(
78
- w3: Union["Web3", "AsyncWeb3"], name_addr_pairs: Dict[str, ChecksumAddress]
78
+ w3: Union["Web3", "AsyncWeb3[Any]"], name_addr_pairs: Dict[str, ChecksumAddress]
79
79
  ) -> Iterator[None]:
80
80
  original_ens = w3.ens
81
81
  if w3.provider.is_async:
@@ -453,7 +453,7 @@ class EventFilterBuilder(BaseEventFilterBuilder):
453
453
 
454
454
 
455
455
  class AsyncEventFilterBuilder(BaseEventFilterBuilder):
456
- async def deploy(self, async_w3: "AsyncWeb3") -> "AsyncLogFilter":
456
+ async def deploy(self, async_w3: "AsyncWeb3[Any]") -> "AsyncLogFilter":
457
457
  if not isinstance(async_w3, web3.AsyncWeb3):
458
458
  raise Web3ValueError(f"Invalid web3 argument: got: {async_w3!r}")
459
459
 
@@ -50,9 +50,11 @@ class HTTPSessionManager:
50
50
  self,
51
51
  cache_size: int = 100,
52
52
  session_pool_max_workers: int = 5,
53
+ explicit_session: Optional[requests.Session] = None,
53
54
  ) -> None:
54
55
  self.session_cache = SimpleCache(cache_size)
55
56
  self.session_pool = ThreadPoolExecutor(max_workers=session_pool_max_workers)
57
+ self._explicit_session = explicit_session
56
58
 
57
59
  @staticmethod
58
60
  def get_default_http_endpoint() -> URI:
@@ -64,6 +66,11 @@ class HTTPSessionManager:
64
66
  session: requests.Session = None,
65
67
  request_timeout: Optional[float] = None,
66
68
  ) -> requests.Session:
69
+ # If an explicit session was provided at init time, always use it
70
+ # regardless of which thread is making the request
71
+ if self._explicit_session is not None:
72
+ return self._explicit_session
73
+
67
74
  # cache key should have a unique thread identifier
68
75
  cache_key = generate_cache_key(f"{threading.get_ident()}:{endpoint_uri}")
69
76