NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1842 most downloaded on PyPI
web3: A Python library for interacting with Ethereum
Last release 1 months ago
31 Aug 2026
Ships fairly regularly
a new release about every 2 months
Most releases are documented
notes for 43 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
10 years old
253 releases · first in 2016
Resolve datetime.datetime.utcnow() deprecation by @mdalp in #3751
get_uncle_* method by @dzhalaevd in #3806Full Changelog: v7.13.0...v8.0.0
One column per quarter.
Bump version: 8.0.0-beta.2 → 8.0.0-beta.3
Bump version: 8.0.0-beta.2 → 8.0.0-beta.3
The ens.exceptions.UnsupportedFunction exception has been removed. Resolver lookups that previously raised UnsupportedFunction (for example, calling get_text against a resolver that does not implement text ) now raise ResolverNotFound instead, since the Universal Resolver collapses both “no resolver found” and “resolver does not support function” into a single revert. Update any except UnsupportedFunction handlers to catch ResolverNotFound . ( #3822 )
Fixed ens.utils.is_none_or_zero_address not detecting bytes-form zero addresses ( b"\x00" * 20 ) — the function compared against the hex string EMPTY_ADDR_HEX only, even though its signature accepts Address (which is bytes ). This caused ens.address(name, coin_type=N) to return the zero-address checksum string instead of None when the resolver recorded a zero address. ( #3822 )
Fix a bug where request caching was not properly working for persistent connection providers ( WebSocketProvider and AsyncIPCProvider ). ( #3825 )
ENS read operations now use the Universal Resolver ( 0xeEeEEEeE14D718C2B47D9923Deab1335E144EeEe ) instead of querying the ENS Registry directly, aligning with ENSv2 readiness requirements. ( #3822 )
Bump version: 8.0.0-beta.1 → 8.0.0-beta.2
Bump version: 8.0.0-beta.1 → 8.0.0-beta.2
Fix HTTPProvider to share an explicitly provided session across all threads, rather than only the creating thread. ( #3800 )
Fix TypedDict field names to use camelCase ( validatorIndex , yParity ) matching JSON-RPC conventions and formatter outputs. ( #3801 )
Exclude type checking in Sphinx module and submodules ( #3803 )
Added documentation for formatters explaining how they work, what the default formatters do, and how to customize them. ( #2994 )
Added configurations for CCIP-Read, defaulting to a more secure configuration based on the EIP recommendations. ( #3817 )
Update ENSIP-15 specs and tests to latest. Add a script to verify our versions of each of the files relevant for ENSIP-15 tests are up-to-date with those in the ENSIP-15 repository. ( #3815 )
Bump version: 7.13.0 → 8.0.0-beta.1
Bump version: 7.13.0 → 8.0.0-beta.1
Drop support for Python 3.8 and 3.9 and upgrade syntax accordingly ( #3774 )
Upgrade websockets requirement to >=14.0. ( #3779 )
Bump eth-utils dependency to require >=5.3.0 ( #3790 )
Fix tests flakiness due to slow data generation from hypothesis triggering a timeout. ( #3730 )
Fix topics type for LogsSubscription to reflect AND / OR nested list conditions on log filters. ( #3748 )
Make AsyncWeb3 with respect to the provider it is instantiated with, fixing static type issues. ( #3761 )
Wrap timeout in ClientTimeout for AsyncBeacon post request ( #3784 )
Update a few broken links ( #3746 )
Fix indentation in the code block in “An introduction to subscriptions” ( #3752 )
Add the TopicFilter type to better describe the cases for filtering logs by topics. ( #3748 )
Add support for Python 3.14 ( #3779 )
Upgrade geth version in CI ( #3787 )
Resolve the DeprecationWarning for the usage of datetime.datetime.utcnow() ( #3751 )
Use latest Geth version v1.16.5 for integration tests. ( #3775 )
Removal of the deprecated LegacyWebSocketProvider . ( #3762 )
Bump version: 7.15.0 → 7.16.0
Bump version: 7.15.0 → 7.16.0
Bump version: 7.14.1 → 7.15.0
Bump version: 7.14.1 → 7.15.0
Added configurations for CCIP-Read, defaulting to a more secure configuration based on the EIP recommendations. ( #3818 )
Bump version: 7.14.0 → 7.14.1
Bump version: 7.14.0 → 7.14.1
Wrap timeout in ClientTimeout for AsyncBeacon post request ( #3784 )
Fix HTTPProvider to share an explicitly provided session across all threads, rather than only the creating thread. ( #3800 )
Fix TypedDict field names to use camelCase ( validatorIndex , yParity ) matching JSON-RPC conventions and formatter outputs. ( #3801 )
Exclude type checking in Sphinx module and submodules ( #3803 )
Added documentation for formatters explaining how they work, what the default formatters do, and how to customize them. ( #2994 )
Upgrade geth version in CI ( #3787 )
Bump version: 7.13.0 → 7.14.0
Bump version: 7.13.0 → 7.14.0
Fix tests flakiness due to slow data generation from hypothesis triggering a timeout. ( #3730 )
Fix topics type for LogsSubscription to reflect AND / OR nested list conditions on log filters. ( #3748 )
Make AsyncWeb3 with respect to the provider it is instantiated with, fixing static type issues. ( #3761 )
Update a few broken links ( #3746 )
Fix indentation in the code block in “An introduction to subscriptions” ( #3752 )
Add the TopicFilter type to better describe the cases for filtering logs by topics. ( #3748 )
Resolve the DeprecationWarning for the usage of datetime.datetime.utcnow() ( #3751 )
Bump version: 7.12.1 → 7.13.0
Bump version: 7.12.1 → 7.13.0
Raise BadResponseFormat from within FormattingMiddleware if the raw response is not a dict. ( #3735 )
Fix broken link to external eth_gasPrice documentation. ( #3717 )
Support parallelization of subscription handling globally via the subscription manager parallelize flag, and on a per-subscription basis via the parallelize flag on the subscription itself. ( #3709 )
Update integration test suite fixture to test against geth v1.16.2 . ( #3738 )
Add missing async tests for FormattingMiddleware as a sanity check. ( #3735 )
Bump version: 7.12.0 → 7.12.1
Bump version: 7.12.0 → 7.12.1
Fix AutoProvider batching setup by adding a proxy batch request. ( #3712 )
Update integrations tests to use geth v1.16.0 . ( #3727 )
#3698 , #3710
- Deprecate ens_encode_name in favor of dns_encode_name .
Thread safety for batching and better consistency with PersistentConnectionProvider implementations:
Make request batching threadsafe by using contextvars.ContextVar rather than a global flag for setting the batching state.
Deterministically match responses with request ids for PersistentConnectionProvider batch requests. ( #3705 )
Deprecate ens_encode_name in favor of dns_encode_name . ( #3700 )
Introduce ens.utils.dns_encode_name as a rename of the current ens_encode_name , for consistency across other language implementations and with the ENS docs. Returns HexBytes instead of bytes . ( #3700 )
Update some types in web3._utils.method_formatters ( #3669 )
Fix issues and start running the core tests with pytest-xdist , effectively reducing the CI test times by ~75-80%. ( #3705 )
optimize message formatting for logging ( #3643 )
Optimize web3._utils.decorators.reject_recursive_repeats ( #3668 )
optimize Method.method_selector_function ( #3696 )
optimize map_abi_data ( #3697 )
- Deprecate eth.get_uncle* methods. Will be removed in v8.
Fix contract event FilterParams to validate and normalize address parameters. ( #3618 )
Properly handle PersistentConnectionClosedOK for subscription_manager.handle_subscriptions() . ( #3690 )
Deprecate eth.get_uncle* methods. Will be removed in v8. ( #3683 )
Re-compile test contracts with new Solidity v0.8.30 and re-generate integration test fixture to test against latest geth v1.15.11 . ( #3692 )
Remove old test fixtures when generating a new test fixture. ( #3693 )
Address some flaky tests due to a geth bug in state synchronization. ( #3695 )
- Checks that PersistentConnectionProvider response cache value is a dict before attempting to access it like one. Also adds checks to make_batch_requ
Checks that PersistentConnectionProvider response cache value is a dict before attempting to access it like one. Also adds checks to make_batch_request to make sure it is in batching mode before being called and is not after. ( #3642 )
Moves base providers’ _is_batching and _batch_request_func_cache from class to instance attrs to help with thread safety. ( #3661 )
Support for Prague network upgrade, mainly requests_hash and authorization_list formatters. Add support for serializing SignedSetCodeTransaction ( eth-account pydantic model) directly added to transaction dicts. ( #3659 )
Allow setting the request_information_cache_size for PersistentConnectionProvider implementations. ( #3662 )
Update some outdated TODO notes in code & remove old un-tested uncles tests as no longer relevant post-merge. ( #3605 )
Run each integration test in isolation and parallelize, instead of running them all within a single geth (for example) process. This prevents muddied test contexts. ( #3659 )
Bound hypothesis integers in some tests to a max of uint256 value ( #3665 )
AsyncENS tests were xfailing for the wrong reason. ( #3675 )
Optimize performance for:
web3._utils.utility_methods.all_in_dict
web3._utils.utility_methods.any_in_dict
web3._utils.utility_methods.none_in_dict ( #3667 )
optimize web3._utils.rpc_abi.apply_abi_formatters_to_dict ( #3671 )
### Miscellaneous Changes - #3653
#3653
- Prevent mutating list of subscriptions when unsubscribing via the subscription_manager by iterating over a copy of the provided list.
Prevent mutating list of subscriptions when unsubscribing via the subscription_manager by iterating over a copy of the provided list. ( #3604 )
Batching can now be used with the AutoProvider ( #3607 )
Update and clean up Contributing docs. ( #3610 )
Add use_text_frames flag for WebSocketProvider to work around websocket servers that don’t support binary frames ( #3619 )
Sync and async support for eth_simulateV1 RPC method. ( #3622 )
Renames a test so pytest finds it. ( #3606 )
Merge template, replacing bumpversion with bump-my-version . ( #3610 )
Update integration test fixture to use latest geth version v1.15.5 . ( #3636 )
Use -U to install latest py-geth version for CI geth steps. This is usually a requirement if we’re missing the binary for the newly-generated fixture geth version. ( #3637 )
Re-compile test contracts with newly released Solidity v0.8.29 . ( #3640 )
#3623
- The bugfix to match unsubscribe to subscribe for multiple subscriptions breaks the function signature for unsubscribe , changing the subscription ar
The bugfix to match unsubscribe to subscribe for multiple subscriptions breaks the function signature for unsubscribe , changing the subscription argument to subscriptions . ( #3585 )
Handle the case when a single RPC error response is returned for a batch request, instead of always expecting a list of responses. ( #3585 )
Don’t raise on non-unique default subscription labels (no label provided). Only raise if a non-unique custom label is explicitly set for a subscription. ( #3594 )
Fix bugs related to subscription manager: run_forever can start with 0 subscriptions and remains alive, unsubscribe accepts single or multiple subs as objects or hexstrs, subscribe for many subs returns a list of hexstr ids. ( #3595 )
Fix issue where .values() raised a KeyError in NamedTupledOnion ( #3596 )
Include topic attribute in ContractEvent docs. ( #3586 )
Introduce Event Subscriptions docs guide ( #3600 )
New Beacon and AsyncBeacon endpoints: get_peer_count , get_attester_duties , get_block_proposer_duties , get_sync_committee_duties , and get_attestation_rewards . ( #3504 )
Move duplicate code into BaseContract class from Contract and AsyncContract . ( #3579 )
Address flaky tests in CI runs. ( #3583 )
Update copyright year from 2024 to 2025 in the LICENSE file. ( #3592 )
Avoid unnecessary extra call to resolver when resolving an ENS address with no coin_type specified (default). ( #3584 )
- Add a disconnect method to the AsyncHTTPProvider that closes all sessions and clears the cache
Add a disconnect method to the AsyncHTTPProvider that closes all sessions and clears the cache ( #3557 )
Fix a bug related to building the ipc path for connecting to a geth --dev instance via web3.auto.gethdev . ( #3576 )
Add a subscription manager to persistent connection providers, with support for handler methods for eth_subscribe subscriptions. ( #3554 )
Implement a topic property for contract events to retrieve the topic for the event. ( #3578 )
#3546
Improve AttributeDict.recursive() and AttributeDictMiddleware performance, effectively speeding up response processing for attrdict middleware by nearly 2x. ( #3575 )
- Include an end-of-line delimiter when sending messages via IPC with the IPCProvider and AsyncIPCProvider .
Include an end-of-line delimiter when sending messages via IPC with the IPCProvider and AsyncIPCProvider . ( #3537 )
Contract functions and events no longer initialize for each call. Retrieval of overloaded functions and events is now deterministic. Any ambiguity will result in an exception being raised. ( #3540 )
Bump the eth-tester version to one that works in the tester dependency extras ( #3555 )
Update ENS-related links ( #3563 )
Upgrade Geth Fixture to 1.14.12 ( #3533 )
Delete ARCHITECTURE.md as unused ( #3547 )
#3525
- Pin websockets<14 due to breaking changes
Update the ContractEvents class to raise a NoABIFound exception if the Contract is initialized without an ABI and an attempt to access an event is made. This exception makes ContractEvents consistent with ContractFunctions . ( #3491 )
Contracts with overloaded functions or events are now supported. The Contract initializes functions and events using an identifier to distinguish between them. The identifier is the function or event signature, which consists of the name and the parameter types. ( #3491 )
Support for w3.eth.blob_base_fee
Async support for w3.eth.blob_base_fee ( #3527 )
Pin websockets<14 due to breaking changes ( #3529 )
#3491
- Add support for Geth Debug traceTransaction.
Polish docs index page ( #3522 )
Add support for Geth Debug traceTransaction. ( #3334 )
New contract methods to obtain event elements from a contract ABI using a name, signature, selector, or topic. ( #3472 )
Add python 3.13 support ( #3493 )
Compile test contracts with newly released Solidity v0.8.28 to ensure compatibility. ( #3515 )
- Fix a bug where CCIP-Read expected a {sender} in the url for a POST request. If {data} is missing from the url, assume a POST request is being made
Fix a bug where CCIP-Read expected a {sender} in the url for a POST request. If {data} is missing from the url, assume a POST request is being made regardless of whether {sender} is present. ( #3291 )
Fix a bug where non-mainnet chains could not cache requests based on missing finalized block number. ( #3508 )
Send json , not data with CCIP-Read POST requests. ( #3512 )
Update the request caching documentation to clarify on when to reach for request caching and how to configure the request validation threshold for certain endpoints. ( #3508 )
Allow a time interval, in seconds, to be used as the request_cache_validation_threshold for request caching. Keep a list of internal default values based on the chain id for some of the bigger chains. ( #3508 )
- Properly wrap AsyncBeacon.request_timeout float in a aiohttp.ClientTimeout when making requests.
Properly wrap AsyncBeacon.request_timeout float in a aiohttp.ClientTimeout when making requests. ( #3503 )
Changes related to an eth-typing bugfix, input types for ABIEvent : ABIComponent -> ABIComponentIndexed . ( #3510 )
Fix EthereumTesterProvider signature in docs, added an eth_tester example. ( #3500 )
Fix pip install -e “.[dev]” command in linux README. ( #3505 )
Update the ENSIP-15 to the latest spec and update the test suite. ( #3501 )
- Base default maxFeePerGas calculation off of existing maxPriorityFeePerGas key instead of separate RPC call
Base default maxFeePerGas calculation off of existing maxPriorityFeePerGas key instead of separate RPC call ( #3052 )
Add back dependency extra for ‘tester’. ( #3480 )
Fix a bug where sensitive requests that make use of block data should not be cached until some validation threshold deems it is safe to do so, when request caching is turned on. ( #3483 )
Update contract.encode_abi signature in docs and migration guide ( #3473 )
Update documentation around SignAndSendRawMiddlewareBuilder injection into the middleware onion. It should be injected lower in the stack than any middleware that modifies the transaction, in order to ensure those modified fields are signed. ( #3488 )
Docs cleanups related to test vs tester install extras. ( #3496 )
Add a configuration for request caching that sets a threshold for validating cached requests that make use of block data. This can be turned off altogether by setting the threshold to None . ( #3483 )
Add a configuration option for the read_buffer_limit for AsyncIPCProvider in order to control the expected message size limit (defaults to 20MB). Add ReadBufferLimitReached for when the read limit is reached, extend from PersistentConnectionError . ( #3492 )
Test warning cleanup ( #3468 )
Re-compile test contracts with recently released Solidity v0.8.27 . ( #3475 )
Re-organize the install extras. Re-define the test extra to always include the tester extra since it’s needed for testing. ( #3495 )
#3490
Improve logic for reading from the async IPC socket in order to properly handle and adjust the handling of large messages. This improves reading speeds in general. ( #3492 )
- Fix a bug with newer hexbytes versions that yield non-0x-prefixed hex for HexBytes : raw_transaction.hex() -> raw_transaction.to_0x_hex() .
Fix a bug with newer hexbytes versions that yield non-0x-prefixed hex for HexBytes : raw_transaction.hex() -> raw_transaction.to_0x_hex() . ( #3471 )
HTTPProvider and AsyncHTTPProvider’s get_request_headers is now available on both the class and the instance ( #3467 )
- Specify a unique __hash__() for unhashable Web3Middleware types and use this hash as the middleware onion key when a name is not provided for the mi
Specify a unique hash() for unhashable Web3Middleware types and use this hash as the middleware onion key when a name is not provided for the middleware. This fixes a bug where different middleware were given the same name and therefore raised errors. ( #3463 )
Fix bug in filters example code ( #3455 )
Update v6 -> v7 migration guide with examples for importing and adding middleware, as well as examples on how to use the MiddlewareBuilder classes. ( #3462 )
Add sync and async support for beacon /eth/v1/beacon/blob_sidecars endpoint. ( #3407 )
Allow user to call ContractFunctions without parentheses ( #3444 )
Refactor and DRY up CI run setup and reduce surface area for errors. Include pre-releases in CI runs for internally maintained libraries to try and catch any conflicts. ( #3452 )
Bump py-geth to >=5.0.0 from >=5.0.0b1 now that stable has been released. This only matters for the test install extra (CI and dev purposes). ( #3458 )
- Update eth-utils and eth-typing to latest major versions
Update eth-utils and eth-typing to latest major versions
eth-utils v5 and eth-typing v5 ( #3450 )
Improve batch request documentation. ( #3448 )
Fix Release Notes formatting ( #3454 )
- Upgrades to use latest ABI utilities and typings from eth-utils and eth-typing .
Upgrades to use latest ABI utilities and typings from eth-utils and eth-typing .
Typings for ABI components are now available in the eth-typing package. ABI types previously in web3.types have been removed.
New versions of existing ABI functions were added to eth-utils and are now exposed in web3.py via web3.utils.abi .
ABI exceptions have been renamed in web3.exceptions . The ABIEventFunctionNotFound and FallbackNotFound exceptions have been removed. Use ABIEventNotFound and ABIFallbackNotFound instead.
MismatchedABI exceptions are raised instead of a Web3ValidationError for ABI related errors.
encode_abi arguments have been updated to use abi_element_name instead of fn_name . ( #3408 )
Remove Web3ValidationError dependence / inheritance from eth-utils ValidationError . ( #3443 )
Use autodoc and update ABI functions with docstrings and doctests. ( #3408 )
Utilities to extract function and event ABI attributes from a contract. Utilities in the web3.utils.abi module parse ABI elements and check encodability of provided arguments. ABI functions in eth-utils are exposed by the web3.utils.abi module.
get_abi_element_info returns an ABIElementInfo TypedDict with the abi , selector , and arguments .
get_abi_element returns the ABI of a function, event, or error given the name and arguments.
check_if_arguments_can_be_encoded returns true if the arguments can be encoded with the given ABI.
get_event_abi returns the ABI of an event given the name.
get_event_log_topics returns the log topics of an event given the name.
log_topics_to_bytes returns the log topics as bytes. ( #3408 )
Add explicit stream kwarg to HTTPProvider so that timeout can be more finely tuned. ( #3428 )
Implement a RequestTimedOut exception, extending from Web3RPCError , for when requests to the node time out. ( #3440 )
Run mypy locally using pre-commit hook, instead of within pre-commit container ( #3414 )
Mitigate inconsistently failing tests for CI runs with appropriate flaky or pytest.mark.xfail() decorators. ( #3440 )
#3408 , #3445
- Refactor the public socket api for persistent connection providers to properly define send() , recv() , and make_request() (send and wait for respon
Refactor the public socket api for persistent connection providers to properly define send() , recv() , and make_request() (send and wait for response) methods for interacting with the open socket. ( #3433 )
Format entries in accessList storageKeys to be HexStr instead of HexBytes ( #3434 )
Handle ConnectionClosedOK case for WebSocketProvider . If a persistent connection is closed gracefully, log and raise a silent PersistentConnectionClosedOK exception, triggering an end to the message listener task and breaking out of the process_subscriptions() iterator. ( #3432 )
Add popitem() functionality to the SimpleCache class as well as an async utility method to wait for the next item, async_await_and_popitem() . ( #3433 )
Refactor some common logic for persistent connection providers back into the base PersistentConnectionProvider class to reduce code duplication and improve maintainability. ( #3433 )
- Change the exception_retry_configuration typing on http providers to be an Optional , as setting this property to None effectively turns off retries
Change the exception_retry_configuration typing on http providers to be an Optional , as setting this property to None effectively turns off retries on exceptions for requests. ( #3412 )
A bugfix, pre-release, to update the Beacon APIs (sync and async) to properly use the new HTTPSessionManager . ( #3421 )
Add an eth_subscribe example to the events guide ( #3403 )
Properly handle InsufficientDataBytes errors when processing receipts ( #3388 )
Provide explicit all exports for providers in web3/providers/init.py ; update web3/init.py to include all provider classes including base classes. ( #3409 )
Re-compile test contracts with Solidity v0.8.25 to ensure compatibility. ( #3307 )
Increase allowable range of eth-tester: 0.11.x and 0.12.x ( #3400 )
Remove uses of signHash in tests, require eth-account >=0.13.0 in doctests ( #3404 )
Use a HTTPSessionManager to manage sessions for http providers, rather than have them share a single session manager / cache. ( #3412 )
- Properly propagate exceptions from the message listener task to the main loop for persistent connection providers.
Properly propagate exceptions from the message listener task to the main loop for persistent connection providers. ( #3378 )
Prunes the node onboarding text ( #3371 )
Stale example cleanup ( #3374 )
Merge migration guides into one page ( #3379 )
Simplify titles of docs guides ( #3381 )
Move ABI Types guide into the Troubleshooting page ( #3382 )
Distribute examples into relevant guides and delete Example page ( #3383 )
Add subscribe/unsubscribe API ( #3386 )
Introduces batch request API ( #3393 )
Add support for request batching via w3.batch_requests() context manager (sync and async). ( #3370 )
Allow request cache configuration on provider init() for all provider classes. ( #3395 )
Merge the python project template, notably adding python 3.12 support ( #3363 )
Increase python-asyncio dependency to be >=0.21.2,<0.23 ( #3369 )
Bump to mypy==1.10.0 for pre-commit ( #3377 )
Move signed.rawTransaction -> signed.raw_transaction in eth module tests ( #3380 )
- messageHash and rawTransaction from eth-account have been deprecated for snake_case versions
Snake-case remaining arguments fromBlock , toBlock , and blockHash in contract and filter methods where they are passed in as kwargs. ( #3353 )
Employ an exponential backoff strategy using the backoff_factor in ExceptionRetryConfiguration for HTTPProvider and AsyncHTTPProvider . Reduce the default initial delay to 0.125 seconds. ( #3358 )
Validate JSON-RPC responses more strictly against the JSON-RPC 2.0 specifications. BlockNumberOutofRange -> BlockNumberOutOfRange . ( #3359 )
messageHash and rawTransaction from eth-account have been deprecated for snake_case versions ( #3348 )
Raise Web3RPCError on JSON-RPC errors rather than Web3ValueError . Raise MethodNotSupported exception when a method is not supported within web3.py ; keep MethodUnavailable for when a method is not available on the current provider (JSON-RPC error). ( #3359 )
Bump eth-account dependency to >=0.12.2 ( #3348 )
Remove the deprecated personal namespace and all references to it. ( #3350 )
- Fix misused call to endpoint_uri for all cases of PersistentConnectionProvider by being able to retrieve either the ipc_path or the endpoint_uri fro
Fix misused call to endpoint_uri for all cases of PersistentConnectionProvider by being able to retrieve either the ipc_path or the endpoint_uri from the base class with endpoint_uri_or_ipc_path property. ( #3319 )
Fix eth_createAccessList docs to reflect the correct behavior. ( #3327 )
Use in-house exception wrappers for common Python exceptions, such as ValueError , TypeError , AttributeError , and AssertionError , for better control over exception handling. ( #3300 )
Add request formatter for maxFeePerBlobGas when sending blob transactions. Add formatters for blobGasPrice and blobGasUsed for eth_getTransactionReceipt . ( #3322 )
Add formatters to ensure that the result of a eth_createAccessList response can be plugged directly into an accessList in a transaction. ( #3327 )
Add Cancun support to EthereumTesterProvider ; update Cancun-related fields in some internal types. ( #3332 )
Use pre-commit for linting, run updated lint tools and fix errors ( #3297 )
Dependency updates: eth-abi>=5.0.1 , eth-account>=0.12.0 eth-typing>=4.0.0 and hexbytes>=1.2.0 with relevant changes to support these. ( #3298 )
Remove code conditionally necessary for python<=3.7 ( #3317 )
- Fix process_log() when parsing logs for events with indexed and non-indexed inputs. get_event_data() now compares log topics and event ABIs as hex v
Fix process_log() when parsing logs for events with indexed and non-indexed inputs. get_event_data() now compares log topics and event ABIs as hex values. ( #3289 )
Fix process_log for HexStr inputs. Explicit type coercion of entry topics and data values. ( #3293 )
Fix typing for json data argument to eth_signTypedData . ( #3308 )
Add note about middlewares change to v7 migration guide. ( #3277 )
Rearrange v7 migration guide and include upgrade path from WebsocketProviderV2 ( #3310 )
Add support for eth_getRawTransactionByHash RPC method ( #3247 )
Add user_message kwarg for human readable Web3Exception messages. ( #3263 )
Add formatters for type 3 transaction fields maxFeePerBlobGas and blobVersionedHashes . ( #3314 )
Add a daily CI run ( #3272 )
Add linting for non-inclusive language with blocklint . ( #3275 )
#3304
Importing ens._normalization is deferred until the first call of ens.utils.normalize_name in order to speed up import web3 . ( #3285 )
Utilize async functionality when popping responses from request manager cache for persistent connection providers. ( #3306 )
Remove Contract.encodeABI() in favor of Contract.encode_abi() to follow standard conventions. ( #3281 )
- Move middlewares -> middleware
Move middlewares -> middleware ( #3276 )
Fix/update methods and decorators in web3/_utils/abi.py to address issues raised by mypy ( #3269 )
Catch all types of eth-abi DecodingError in EthereumTesterProvider->_make_request() ( #3271 )
Remove annual user survey prompt from docs ( #3218 )
Introduce feedback form banner prompt on docs ( #3253 )
Refresh of the middleware docs ( #3266 )
#3259 , #3262
Remove the ethpm module and related docs, tests, and dependencies ( #3261 )
This PR also closes out a few outstanding issues and will be the start of the breaking changes for web3.py v7 . Review PR for a full list of changes.
Refactor the middleware setup so that request processors and response processors are separated. This will allow for more flexibility in the future and aid in the implementation of features such as batched requests. This PR also closes out a few outstanding issues and will be the start of the breaking changes for web3.py v7 . Review PR for a full list of changes. ( #3169 )
Use a message listener background task for WebsocketProviderV2 rather than relying on ws.recv() blocking. Some breaking changes to API, notably listen_to_websocket -> process_subscriptions . ( #3179 )
Drop dependency on lru-dict library. ( #3196 )
Drop support for python 3.7 ( #3198 )
Return iterable of ABIFunctions from the BaseContractFunctions iterator. ( #3200 )
Name changes internal to the library related to v7 : WebsocketProvider -> LegacyWebSocketProvider , WebsocketProviderV2 -> WebSocketProvider ( #3225 )
CallOverride type change to StateOverride to reflect better the type name for the state override. eth_call is also not the only method with this param, making the name more generic. ( #3227 )
Rename beacon/main.py -> beacon/beacon.py ( #3233 )
EthereumTesterProvider now returns input for eth_getTransaction* for better consistency with JSON-RPC spec. ( #3235 )
Change the signature for the async version of wait_for_transaction_receipt() to use Optional[float] instead of float . ( #3237 )
get_default_ipc_path() and get_dev_ipc_path() now return the path value without checking if the geth.ipc file exists. ( #3245 )
Fix return type of AsyncContract.constructor ( #3192 )
Handle new geth errors related to waiting for a transaction receipt while transactions are still being indexed. ( #3216 )
Documentation was updated to reflect early changes to v7 from v6 . A v6 -> v7 migration guide was also started and will be added to as v7 breaking changes are introduced. ( #3211 )
Remove ENS v6 breaking change warning from v7 ( #3254 )
Add AsyncIPCProvider ( #2984 )
Implement state_override parameter for eth_estimateGas method. ( #3164 )
Upgrade eth-tester to v0.10.0-b.1 and turn on eth_feeHistory support for EthereumTesterProvider . ( #3172 )
Add formatters for new Cancun network upgrade block header fields: blobGasUsed , excessBlobGas , and parentBeaconBlockRoot . ( #3223 )
Contract event get_logs results sorted by each ContractEvent logIndex . ( #3228 )
Create test fixture for latest geth version. Run tests with geth in --dev mode. ( #3191 )
Validate geth version used to generate the integration test fixture against the version in the binary that is used to run the tests. ( #3193 )
Internal change to WebsocketProviderV2 before release: raise exceptions in message listener task by default; opting to silence them via a flag. ( #3202 )
Compile contracts with and test against new Solidity version v0.8.24 . ( #3204 )
Formatting updates for black==24.1.0 . ( #3207 )
Allow HTTP provider request retry configuration to be turned off appropriately. Internal change since v7 has not yet been released. ( #3211 )
Upgraded geth fixture version ( #3231 )
#2964 , #3248
Remove call to parse_block_identifier when initializing ContractCaller functions. ( #3257 )
normalize_request_parameters middleware was in a stale state and not being used or tested. This middleware has been removed. ( #3211 )
Remove deprecated geth.miner namespace and methods. ( #3236 )
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
- Change fee_history default behavior. If reward_percentiles arg not included, pass it to the provider as an empty list instead of None .
Change fee_history default behavior. If reward_percentiles arg not included, pass it to the provider as an empty list instead of None . ( #3185 )
Use importlib.metadata for version info if python>=3.8 ( #3187 )
Remove docs reference for removed protocol_version RPC method ( #3183 )
Re-define how async vs sync core test suites are ran. ( #3180 )
Add basic import and version tests for the web3 module ( #3187 )
- Implement async eth_createAccessList RPC method to create an EIP-2930 access list.
Implement async eth_createAccessList RPC method to create an EIP-2930 access list. ( #3167 )
Add flaky async Geth integration tests to CI ( #3170 )
Fix wrong test reference for EthereumTesterProvider integration test suite. ( #3171 )
Small fix for integration tests for tox to recognize independent patterns for each test run. ( #3173 )
- Make downloadable versions of docs available in pdf , htmlzip , and epub formats
Make downloadable versions of docs available in pdf , htmlzip , and epub formats ( #3153 )
Add 2023 user survey fine art banner in the docs ( #3159 )
Polish the community resources docs page ( #3162 )
Implement createAccessList RPC endpoint to create an EIP-2930 access list. ( #2381 )
Run flaky eth-tester tests on CI ( #3157 )
Pin pytest-asyncio dependency to <0.23 ( #3160 )
- Fix collision of w3 variable when initializing contract with function of the same name
Fix collision of w3 variable when initializing contract with function of the same name ( #3147 )
#3148
- Add upper pin to deprecated dependency lru-dict whose new minor version release introduced a typing issue with CI lint builds.
When coming back through the middleware onion after a request is made, we have the response id . Use it to match to the cached request information and process the response accordingly. ( #3140 )
Adds Discord bot template repo to Resources page ( #3143 )
Additional contract abi documentation to make it a clear requirement for contract instances. ( #2539 )
Fix type annotations for web3 constants. ( #3138 )
Add upper pin to deprecated dependency lru-dict whose new minor version release introduced a typing issue with CI lint builds. ( #3144 )
Recompile test contracts with new Solidity version v0.8.23 to ensure compatibility. ( #3146 )
- Fix formatting in documentation for creating an account.
Fix formatting in documentation for creating an account. ( #3128 )
Fix broken links for Apeworx and Sepolia faucet ( #3130 )
Speed up the core test suite by splitting up sync and async tests. This reduces the CI build times to ~8min from ~12min. ( #3111 )
Re-compile test contracts with Solidity v0.8.22 to ensure compatibility with this latest Solidity version. ( #3134 )
Improvements on yielding to the event loop while searching in response caches and calling recv() on the websocket connection for WebSocketProviderV2 . ( #3135 )
- Add upper pin to hexbytes dependency to due incoming breaking change
Update WebsocketProviderV2 documentation. Document a general overview of the RequestProcessor class and its internal caches. ( #3125 )
Properly define an await() method on the _PersistentConnectionWeb3 class so a persistent connection may be initialized using the await pattern. Integration tests added for initializing the persistent connection using the await pattern. ( #3125 )
Updates and refactoring for the WebsocketProviderV2 class and its internal supporting classes and logic. Separation of one-to-one and one-to-many request responses. Storing of one-to-many responses in a deque and one-to-one responses in a SimpleCache class. Provide an async lock around the websocket recv() . ( #3125 )
Add upper pin to hexbytes dependency to due incoming breaking change ( #3127 )
#3114 , #3129
- Refactor the async iterator pattern for message streams from the websocket connection for WebsocketProviderV2 to a proper async iterator. This allow
Refactor the async iterator pattern for message streams from the websocket connection for WebsocketProviderV2 to a proper async iterator. This allows for a more natural usage of the iterator pattern and mimics the behavior of the underlying websockets library. ( #3116 )
Use hashes to compare equality of two AttributeDict classes ( #3104 )
Fix issues with formatting middleware, such as async_geth_poa_middleware and subscription responses for WebsocketProviderV2 . ( #3116 )
Change docker-compose to docker compose in the Contributing docs examples. ( #3107 )
Updates to the WebsocketProviderV2 documentation async iterator example for iterating over a persistent stream of messages from the websocket connection via async for . ( #3116 )
Update outdated node and private key management verbiage. ( #3117 )
Allow passing in a float for a request_timeout for requests for the Beacon class. Update some Beacon API endpoints (sync and async). ( #3106 )
Add allow_list kwarg for exception_retry_middleware to allow for a custom list of RPC endpoints. Add a sleep between retries and a customizable backoff_factor to control the sleep time between retry attempts. ( #3120 )
Refactor logic for the input_munger() method on the Method class. ( #2987 )
Pin mypy to v1.4.1, the last to support py37 ( #3122 )
- Breaking change to the API for interacting with a persistent websocket connection via AsyncWeb3 and WebsocketProviderV2 . This change internalizes t…
Breaking change to the API for interacting with a persistent websocket connection via AsyncWeb3 and WebsocketProviderV2 . This change internalizes the provider.ws property and opts for a w3.ws API achieved via a new WebsocketConnection class. With these changes, eth_subscription messages now return the subscription id as the subscription param and the formatted message as the result param. ( #3096 )
Return w3.eth.gas_price when calculating time based gas price strategy for an empty chain. ( #1149 )
Update LogReceipt and TxReceipt declarations. Remove LogReceipt ’s payload and topic attributes. Refactor LogEntry to LogReceipt . ( #3043 )
Fixes AsyncEth.max_priority_fee_per_gas . It wasn’t falling back to eth_feeHistory since the MethodUnavailable error was introduced. ( #3084 )
Update WebsocketProviderV2 documentation to reflect the new public websocket API via the WebsocketConnection class. ( #3096 )
Improved error messaging for exceptions from malformed JSON-RPC responses. ( #3053 )
Enable filtering by non-indexed arguments for contract event get_logs() . ( #3078 )
Add eth_maxPriorityFeePerGas to exception_retry_middleware whitelist ( #3090 )
Sync responses for WebsocketProviderV2 open connections with requests via matching RPC id values. ( #3096 )
Properly JSON encode AttributeDict , bytes , and HexBytes when sending a JSON-RPC request by utilizing the in-house Web3JsonEncoder class. ( #3101 )
Fix an issue with an IPC test present only on MacOSX. ( #929 )
Ignore flake8 rule F401 (unused import) in all init.py files ( #3097 )
- Fix the type for input in TxData from HexStr -> HexBytes .
Fix the type for input in TxData from HexStr -> HexBytes . ( #3074 )
Fix an issue with WebsocketProviderV2 when responses to a request aren’t found in the cache ( None values). ( #3075 )
Re-expose some websockets constants found in web3.providers.websocket.websocket via web3.providers.websocket . ( #3076 )
Return NotImplemented constant, rather than raising NotImplementedError for NamedElementOnion.add() , based on Python standards. ( #3080 )
Only release async_lock if it’s locked to begin with. ( #3083 )
Add MEV blocking tutorial to Resources docs page ( #3072 )
Fix documentation around current state of get_logs() usage and arguments. ( #3073 )
Add an Ape hackathon kit to Resources documentation page ( #3082 )
- Fix the type for the optional param asking for “full transactions” when subscribing to newPendingTransactions via eth_subscribe to bool .
Fix the type for the optional param asking for “full transactions” when subscribing to newPendingTransactions via eth_subscribe to bool . ( #3067 )
Change docs to reflect AsyncHTTPProvider does accept ENS names now ( #3070 )
Return structured JSON-RPC errors for missing or unimplemented eth-tester methods. ( #3061 )
ENS name-to-address support for eth_subscribe . ( #3066 )
Asynchronous iterator support for AsyncWeb3 with WebsocketProviderV2 using async for syntax. ( #3067 )
Minor fixes to type hinting in the core tests setup fixtures. ( #3069 )
- Test wheel build in separate directory and virtualenv
Test wheel build in separate directory and virtualenv ( #3046 )
Handle case where data gets returned as None in a JSON-RPC error response ( #3054 )
Fixed default windows IPC provider path to work with python 3.11 ( #3058 )
Fix return type for rpc_gas_price_strategy to int but also only convert the strategy_based_gas_price to hex if it is an int in the gas_price_strategy_middleware . ( #3065 )
Add note to Release Notes about v5 end-of-life and v6.6.0 yank ( #3045 )
Add documentation for WebsocketProviderV2 (beta). ( #3048 )
Add ENSIP-9 (Multichain Address Resolution) support for address() and setup_address() for ENS and AsyncENS classes. ( #3030 )
Support for eth_subscribe and eth_unsubscribe methods has been added with the introduction of a new websocket provider, WebsocketProviderV2 . ( #3048 )
Added recursive typing to ABIFunctionComponents type ( #3063 )
Upgrade eth-tester requirement to v0.9.0-b.1 ( #3064 )
Your coding agent can read these notes before it upgrades. Set up the MCP server →