-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Async ens no factory #2547
Merged
Merged
Async ens no factory #2547
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Change ``ens.main`` to ``ens.ens`` * Added AsyncENSFactory to handle async creation of AsyncENS * Reorganize ENS, AsyncENS, and BaseENS into separate modules * Added async ENS tests * Updated docs * newsfragment
* Add some missing awaits * Add a lot more testing around AsyncENS. We can think about splitting async ENS tests off into their own CI job if they get too big, but we should provide ample testing around the async implementation to make sure it's all wired up correctly. * Cleanup for better readability and consistency across ENS and AsyncENS * Keep async_ens_setup as session scope with a session-scoped event_loop fixture and add a session-scoped async_w3 for ens module * Fix some minor warnings with optionals where ``None`` is being passed in * nit: Since we are adding so many new lines, match code style to ideal rest of library for consistency. Trailing commas with new arguments allow for a cleaner git blame / git history since the next bit of code added would only touch the new line that is created, etc. (``black`` formatting PRs are coming in now though so this wasn't very important after the first commit that was squashed here).
fselmo
commented
Jun 28, 2022
5d5cce9
to
0510960
Compare
- Create the stalecheck middleware for ENS in a similar way as to the others in order to remove the need to ``await`` it within the ``init_async_web3`` method, and therefore within the ``AsyncENS`` ``__init__`` method. This removes the need for the ``AsyncENSFactory`` altogether since it removes the need for the ``await``.
0510960
to
9abde38
Compare
9abde38
to
c5f2b8c
Compare
pacrob
reviewed
Jun 29, 2022
pacrob
approved these changes
Jun 29, 2022
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.
one naming nit, otherwise lg!
fselmo
added a commit
to fselmo/web3.py
that referenced
this pull request
Jun 29, 2022
kclowes
approved these changes
Jun 29, 2022
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.
fselmo
added a commit
to fselmo/web3.py
that referenced
this pull request
Jul 1, 2022
1853211
to
121688b
Compare
fselmo
added a commit
to fselmo/web3.py
that referenced
this pull request
Jul 1, 2022
121688b
to
7321d72
Compare
kclowes
reviewed
Jul 1, 2022
7321d72
to
5a6d2e2
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was wrong?
Builds on #2501 by @dbfreem
This time I felt the need to branch off into a separate PR because it is more than just adding tests and organizing. I went a different route and was able to remove the need for
AsyncENSFactory
. This does build on the initial main changes for async ENS but we can keep the discussion on this alternate PR separated.How was it fixed?
AsyncENSFactory
from Feature/ens asyncify #2501Todo:
Cute Animal Picture