web3.py v6 Release Announcement
web3.py v6.0.0 release: feature highlights, breaking changes, and a look ahead.
gm v6! 🌞
We sneks are pleased to announce the release of web3.py v6.0.0! Keep reading for feature highlights, breaking changes, and a look ahead.
Many of these features were introduced in a v5 release, but there's a good chance that one or more may have slipped under your radar.
- Smol rebrand – Mirroring similar libraries,
web3.py(with a lowercase "w") is how the library will be universally referenced now. Very hip.
- Modern Python support – Python 3.10 and 3.11 versions supported.
- Async support – The
AsyncHTTPProvideris ready for prime time!
- The Merge™ support –
"finalized"block identifiers are available for use in relevant RPC calls.
- Multithreading – If in need of concurrency, but unable to use
asyncio, web3.py has improved multithreading support.
- Improved customization – If you want to add or edit functionality within web3.py, you've now got a number of options.
- CCIP Read support – web3.py supports contracts that reference off-chain data.
With a major version update comes breaking changes, and we saved up a good few for this release. Here's what you're most likely to bump into when upgrading web3.py within your application:
camelCasesyntax. The last of that has been updated to
- Dependencies – Pinned upper limit versions were removed where possible, and some dependencies were updated as required by newer versions of Python.
- Strict byte checking – Once an option, now a default setting: if an ABI expects a particular length byte argument, web3.py will no longer attempt to convert ambiguous values. Safety first, though this functionality can be toggled off.
- Base Exceptions – The varied exceptions across the library now inherit from
EthPMExceptionwere introduced in those respective modules.
- Validation Errors – New
EthPMValidationErrorall inherit from the generic
- Full deprecations – A few methods, auto-providers, and modules have been removed in this release.
For a full list of breaking changes, check out the migration guide.
The road ahead
While we hope the v6 release solves some of your biggest headaches and helps you get a little closer to nirvana, we're already starting to look ahead to what's next.
Like any open source library, there's a steady diet of issue triage and bug fixing, but there are a couple of big themes that will continue to be prioritized, namely: Ethereum protocol upgrades ("Shanghai" up next), improved asynchronous support, and typing improvements throughout.
To get a better sense of what should be on our radar beyond those items, we launched the first web3.py User Survey. Those results and more long-winded takeaways can be found here.
Finally, thanks for being a web3.py user and a member of the Ethereum Python community! If you haven't already, make sure to join the Ethereum Python Community Discord server to meet other Pythonistas, give and receive technical help, and share a gm.