-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
feat: support web3.py v7 (in addition to v6) #2394
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way to make it work with both v6 and v7?
Yes we can, but the tests will probably only run on v7 unless we add another dimension to the matrix (which I try to avoid). |
Another thing to note! Getting it to work on both is easy, but where we fudged up is the plugins: they have no pins for peer ape dependencies with comment ( |
1be405c
to
c310ddf
Compare
that sounds fine, I just want to avoid unintentially rugging people on the older version, at least until v0.9 where we can drop v6 |
5fed9f8
to
4ec244c
Compare
a452e4d
a452e4d
to
968b0bb
Compare
request_header: dict = { | ||
"User-Agent": construct_user_agent(str(HTTPProvider)), | ||
} | ||
request_header: dict = {"User-Agent": f"EthereumNodeProvider/web3.py/{web3_version}"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to reviewer: this basically makes it the same as it was before, v7 changes this method to make it more web3-specific by including a required module arg
What I did
work was already done in another branch but after discussing with @fubuloubu a couple weeks ago, we are going to push forward with it before 0.9
update any plugins importing stuff from web3 at the same time, such as ape-hardhat
ape-alchemy (feat: support web3.py dependencies ape-alchemy#89)
ape-infura (feat: support web3.py dependencies ape-infura#97)
ape-hardhat (feat: support web3.py 7.0 dependencies ape-hardhat#185)
ape-chainstack (feat: support web3.py dependencies ape-chainstack#12)
ape-ens (feat: support web3.py 7.0 dependencies ape-ens#40)
ape-foundry (feat: support web3.py dependencies ape-foundry#118)
ape-frame (feat: support web3.py dependencies ape-frame#14)
ape-tenderly (feat: support web3.py dependencies ape-tenderly#17)
How I did it
How to verify it
Checklist