-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Replace legacy websocket provider with V2 #3225
Conversation
bdf91d2
to
f974a71
Compare
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.
Just putting this here so we don't forget... we need to add a deprecation warning (or some type of warning) in v6 on the WebsocketProvider
to let people know about the change from WebsocketProvider
-> LegacyWebsocketProvider
, and provide the legacy alias. I'm also happy to add an issue, just let me know!
Looks good! I think there are a couple spots in the Quickstart docs where the new WebsocketProvider API doesn't work quite like the docs say it does, but that may just be user error :)
The organization of providers feels unintuitive: Maybe org the HTTP Providers together? Do we have future Just thinking out loud. What'chu think? |
Yeah, we don't neatly split between Sync and Async providers any more. We really have Sync Providers, Async Providers, and Persistent Connection Providers, IMHO. Might be good to reflect that in the docs |
28bae12
to
4894a7c
Compare
- ``WebsocketProvider`` -> ``LegacyWebsocketProvider`` - ``WebsocketProviderV2`` -> ``WebsocketProvider`` - Update documentation and code base to reflect these changes Additionally: - Remove the need for ``persistent_connection()`` on the ``AsyncWeb3`` class by implementing the magic methods on ``AsyncWeb3`` itself. - Use a method wrapper for methods only allowed when ``AsyncWeb3`` is instantiated with a ``PersistentConnectionProvider``. ... fix lint
4894a7c
to
d480151
Compare
d480151
to
e16f83d
Compare
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.
lgtm!
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.
More of a nit, but it's still bugging me that everything we get from the websockets
lib uses capital S WebSocket
and we use mostly Websocket
. But as long as ya'll are good with it, lgtm :)
737d7a0
to
b7fae4e
Compare
Being that the protocol is WebSocket, let's make it happen since we're already breaking everything. Updated in the last commit. |
c2377c7
to
e2c44f9
Compare
What was wrong?
We wanted to get these changes in before the first release of
v7
beta.How was it fixed?
WebsocketProvider
->LegacyWebSocketProvider
WebsocketProviderV2
->WebSocketProvider
Todo:
Cute Animal Picture