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

deprecated estimateGas and buildTransaction in v5 contract #2438 #2459

Merged
merged 11 commits into from
Jun 8, 2022

Conversation

dbfreem
Copy link
Contributor

@dbfreem dbfreem commented May 4, 2022

Deprecating buildTransaction and estimateGas in the v5 branch. I will remove them in the asyncify-contract branch so they are effectively removed in v6

Related to Issue #1416

Todo:

@dbfreem
Copy link
Contributor Author

dbfreem commented May 4, 2022

@kclowes take a look at this PR. I closed my other PR because I accidently pulled from master and REALLY messed it up.

@dbfreem
Copy link
Contributor Author

dbfreem commented May 5, 2022

I fixed the issue with the combomethod annotation. Also, @kclowes I took care of the warnings in the test in the asyncify-contract branch already so I was going to leave these. thoughts??

@kclowes
Copy link
Collaborator

kclowes commented May 11, 2022

Also, @kclowes I took care of the warnings in the test in the asyncify-contract branch already so I was going to leave these. thoughts??

For deprecations, we prefer to change all of the instances of our code over to the new function name and then have one test to be sure the deprecation warning gets shown just so that we don't have a bunch of noise in our test output. For example something like:

def test_that_deprecation_warning_is_shown():
    ...
    with pytest.warns("DeprecationWarning", match="estimateGas has been deprecated in favor of estimate_gas")
        contract.functions.foo().estimateGas()

@dbfreem
Copy link
Contributor Author

dbfreem commented May 13, 2022

@kclowes makes sense I will take a look at this.

@dbfreem
Copy link
Contributor Author

dbfreem commented May 13, 2022

@kclowes this one should be good to go now.

Copy link
Collaborator

@kclowes kclowes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I left a few questions, but after those are addressed, should be good to go!

docs/contracts.rst Show resolved Hide resolved
docs/contracts.rst Show resolved Hide resolved
tests/core/contracts/conftest.py Show resolved Hide resolved
web3/contract.py Outdated Show resolved Hide resolved
@dbfreem
Copy link
Contributor Author

dbfreem commented Jun 2, 2022

This should be good to go

Copy link
Collaborator

@kclowes kclowes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This looks good to me! I'm going to change the newsfragment from misc to feature just so it gets highlighted in the release notes. Any miscs only show up as the PR number.

@kclowes kclowes merged commit 68a9d8c into ethereum:v5 Jun 8, 2022
@dbfreem dbfreem deleted the feature/deprecateMethods branch July 9, 2022 10:18
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

Successfully merging this pull request may close these issues.

2 participants