-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Planned v5 changes #722
Comments
Not sure if you want to list the removals of things that have been deprecated.
|
Deprecate |
Re: vyperlang/vyper#815 (comment) After seeing people struggle with it, I do think that we should stop encouraging the use of contract = w3.eth.contract(address, abi=abi)
reader = contract.reader({'from': caller_addr, ...}) # essentially ConciseContract(contract) with sugar
reader.balanceOf(address) # or whatever call you want to make Many of these features can be added in v4, except it would be nice to drop the |
@carver A pattern we could encourage would be creating your own contract classes combined with some helpers. from web3.contract import Contract, read_only_fn, read_only_property, contract_fn
class Token(Contract):
symbol = read_only_property('symbol')
decimals = read_only_property('decimals')
balanceOf = read_only_fn('balanceOf')
myBalance = read_only_property('balanceOf', args=(my_address,))
transfer = contract_fn(transact={'from': my_address'}) Basically, a guide on how to subclass the |
I'd love to see |
Yeah, we should start exploring it before v5, too. Then, we can figure out what kinds of backwards-incompatible changes might be warranted. |
Drop some of the repeated endpoints. Use and standardize the "supported endpoints" endpoint. EIP for all current standards. |
drop |
drop |
Should we add a warning that v6 will drop support for eth-abi <2? |
@dylanjw this issue could probably be broken up into multiple issues and grouped using a milestone. Probably worth us having a v5 milestone so we can start figuring out where we draw the line for a v5 release. |
See #1132 I propose that we change |
|
I'd like to nominate type hinting to be added to this list, though it isn't a blocker on releasing v5 since it's not a breaking change. I think web3.py is our last major library that isn't type hinted. |
@pipermerriam @carver & @njgheorghita - I think we've completed all of the breaking changes listed in this issue. Do any of you see anything breaking that I missed? We decided that all of the async stuff will be non-breaking, right? |
Nice! I don't know of a more authoritative list than the one in this issue. So I guess we're ready to go beta! (and time for a blog post :)) |
v5 has no planned release date, but it would be nice to have some ideas in mind for what we would want to change.
Potential v5 backwards-incompatible changes
Each of these line items should have its own issue. This is just a place to link them all (and a reminder to create the issue later).
Edit: I'll try to update this list to keep it in sync with the comments below:
Web3.sha3
toWeb3.keccak
Drop deprecatedweb3.sha3
method #1207ConciseContract
, and rename to something likeContractReader
- Contract Caller Cleaned up #1227shouldn't be API-breaking changes, or delay the v5 releasew3.async
thingspersonal_*
calls are not globally defined or supported and should probably be moved, likepersonal_importRawKey
. Might make sense to have those on something like:w3.geth.personal.importRawKey
)IPCProvider
. Drop auto detect testnets for IPCProvider #1206.eth
as a suffix on ENS names. ENS - Stop inferring .eth TLD #1205contract.call()
contract.transact()
contract.eventFilter()
contract.deploy()
contract.estimateGas()
contract.buildTransaction()
web3.providers.tester.EthereumTesterProvider
andweb3.providers.tester.TestRPCProvider
Drop web3.providers.tester.py (V5 beta) #1199contract.eventFilter
Removes depracated Contract.eventFilter. Fixes #1028. #1032web3.eth.getBlock
andweb3.eth.getTransaction
raise an exception rather than returnNone
Raise exceptions rather than return None in all jsonrpc calls #1218web3.utils.*
in favor ofweb3._utils.*
- Remove web3/utils folder #1282EDIT: I went through this thread and added all the breaking changes I saw so that they are all in one place. I think once we get through this list and do some testing, we can get a beta release out. - KC
The text was updated successfully, but these errors were encountered: