web3.py: v6 Breaking Changes
Now that v5 stable is out, it’s time to start collecting a list of breaking changes that we might like to see in v6. I’ll update this issue as they come up.
Outstanding breaking tasks:
- Python 3.11 Support - #2699
- Remove Infura auto provider logic from within web3 ~~and make a template for new auto providers to use. See issue https://github.com/ethereum/web3.py/issues/1736~~ (#2706)
- Remove
SolidityError
in favor of the more genericContractLogicError
. See issue #1901 - Remove camelCase function names in favor of snake_case. See #2598
- Remove Parity module (via #2718)
- Remove version module (see #2729)
- Make ipfshttpclient opt-in. (See #2730 which closes #2629)
- Remove
start_rpc
andstop_rpc
fromgeth.admin
module (see #2731) - Standardize
apply_formatter_to_array
functions. See #1902 - Custom web3py exceptions inherit from Web3Exception. See #1478
- Enable strict bytes length checking by default. See issue #1419 and #1154.
- Don’t allow users to pass bytestrings to contract functions if the bytestring is the wrong length. As it stands, if a bytestring is shorter than the required length, we pad it. If it is longer, we throw an error. See issue #1903.
- Raise specific web3 error rather than
ValueError
when method isn’t available on the node: https://github.com/ethereum/web3.py/issues/2448 - Standardize default value for block_identifier in eth.call and ContractFunctions.call. Change made in https://github.com/ethereum/web3.py/pull/2335 already, just needs tests.
- Opt in or out of
dict
toAttributeDict
conversion via middleware choice. See #1656. - Rich tuple decoder #1353
- Clean up Async typing
shouldn’t be breaking:
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 26 (6 by maintainers)
Hey @MartinThoma, we are in a code merge freeze and late testing phase just to make sure we don’t need to make minor adjustments. If there are no complications,
v6.0.0
should be right around the corner 🙂.To clarify, what do you mean by
v7
is released? We’ve opened an issue to start capturing future breaking changes that will go intov7
but that is the only v7-related content at the moment.I see that this is closed and
v7
is ~released~ in planning, butweb3==6.0.0
is not yet on PyPI: https://pypi.org/project/web3/#historyDo you know when it will be? How is the procedure to decide when this will be?
I’m very excited about it, as web3 is currently blocking one of my projects from moving to Python 3.11 😅
I see all checkmarks here set 🎉🥳
It would be great to integrate
pre-commit
withintox
to make thedev
process faster & easier in a way that developers are not required to manually fix linting issues. To do so, The following modifications would be introduced totox.ini
:instead of:
And then add code formatters and fixers in the
pre-commit
config file(.pre-commit-config.yaml
) as local hooks like:To add
black
as @kclowes did in PR:#2345, just add a new local hook in a similar fashion to the previous ones:pre-commit
is equipped with useful built-in fixers to automatically format files given certain properties such as:The good news is that these modifications are backward compatible with the current
make
andtox
configurations, running$ make lint
, however, would generate something similar to the following:What do you think about adding
pre-commit
? If y’all agree, I will be more than happy to open a PR.Looks like the #1419 plan is to enable strict bytes length checking by default. At which point I think #1154 could be closed.
The code frozen version is up as
v6.0.0-beta.11
. Let us know if you see anything!~Whisper is officially out of Geth distros (latest release notes), so we probably ought to drop support too.~
Not necessary to wait for v6. Support removed in #1791.