Skip to content
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

Closed
22 tasks done
carver opened this issue Mar 27, 2018 · 16 comments
Closed
22 tasks done

Planned v5 changes #722

carver opened this issue Mar 27, 2018 · 16 comments

Comments

@carver
Copy link
Collaborator

carver commented Mar 27, 2018

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:

EDIT: 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

@pipermerriam
Copy link
Member

Not sure if you want to list the removals of things that have been deprecated.

  • removal of contract.call()
  • removal of contract.transact()
  • removal of contract.eventFilter()
  • removal of contract.deploy()
  • removal of contract.estimateGas()
  • removal of contract.buildTransaction()

@pipermerriam
Copy link
Member

Deprecate Web3.sha3 and rename to Web3.keccak

@carver
Copy link
Collaborator Author

carver commented May 10, 2018

Re: vyperlang/vyper#815 (comment)

After seeing people struggle with it, I do think that we should stop encouraging the use of ContractFactoryClass=ConciseContract in the web3.py docs. But I still think there's value in the concise style. Something like:

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 transact/estimateGas support in ConciseContract entirely, and drop the name in favor of ContractReader or something.

@pipermerriam
Copy link
Member

pipermerriam commented May 10, 2018

@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 Contract class and then some helpers for common patterns like wanting property access to zero argument functions.

@pipermerriam
Copy link
Member

I'd love to see web3.async in v5 as well but this list is starting to get long.

@carver
Copy link
Collaborator Author

carver commented May 22, 2018

I'd love to see web3.async in v5 as well

Yeah, we should start exploring it before v5, too. Then, we can figure out what kinds of backwards-incompatible changes might be warranted.

@carver
Copy link
Collaborator Author

carver commented May 31, 2018

Drop some of the repeated endpoints. Use and standardize the "supported endpoints" endpoint. EIP for all current standards.

@voith
Copy link
Contributor

voith commented Aug 27, 2018

drop web3.providers.tester.EthereumTesterProvider and web3.providers.tester.TestRPCProvider

@dylanjw
Copy link
Contributor

dylanjw commented Aug 27, 2018

drop contract.eventFilter
deprecation warning for contract.events.<eventname>.createFilter

@dylanjw
Copy link
Contributor

dylanjw commented Aug 27, 2018

Should we add a warning that v6 will drop support for eth-abi <2?

@pipermerriam
Copy link
Member

@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.

@pipermerriam
Copy link
Member

See #1132

I propose that we change web3.eth.getBlock, web3.eth.getTransaction and other similar methods to no longer return None, but instead to raise an exception. The current API encourages/requires return value checking which is not a pattern I think we should be promoting.

@njgheorghita
Copy link
Contributor

@davesque davesque pinned this issue Mar 11, 2019
@pipermerriam
Copy link
Member

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.

@kclowes
Copy link
Collaborator

kclowes commented Apr 24, 2019

@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?

@carver
Copy link
Collaborator Author

carver commented Apr 24, 2019

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 :))

@carver carver closed this as completed Nov 1, 2019
@carver carver unpinned this issue Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants