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

Upgrade websockets to 10.1 ? #2272

Closed
broper2 opened this issue Dec 21, 2021 · 10 comments · Fixed by #2324
Closed

Upgrade websockets to 10.1 ? #2272

broper2 opened this issue Dec 21, 2021 · 10 comments · Fixed by #2324

Comments

@broper2
Copy link
Contributor

broper2 commented Dec 21, 2021

  • Version: 5.25.0
  • Python: 3.8
  • OS: osx
  • pip freeze output
solana==0.19.0 (problem)

What was wrong?

Currently in dependency hell trying to use solana-py and web3 in same service. solana-py requires websockets 10.1, web3 seems to not support that. Below is the changelog for 10.1 release of websockets, there are no incompatible changes. Any chance I could bother the team to consider upgrading support to 10.1?

Also, from my logs it seems web3 needs "websockets<10" but i think changes were made to support 10.0 (#2175) . May need to update requirements:

remote: The conflict is caused by:
remote: solana 0.19.0 depends on websockets<11.0 and >=10.1
remote: web3 5.25.0 depends on websockets<10 and >=9.1

https://websockets.readthedocs.io/en/latest/project/changelog.html#id3

Thanks!

How can it be fixed?

Upgrade websockets support to 10.1


Note: We prefer to use issues to track our work. If you think you've encountered a bug in web3py or
have a feature request, you're in the right place. If you have implementation or usage questions,
please refer to our documentation and/or join the conversation
on discord.

@tudoanh
Copy link

tudoanh commented Jan 5, 2022

Yes please upgrade the requirement for websocket lib to support >= v10.0

Thank you.

@AgentCosmic
Copy link

+1 for this. Python 3.10 needs v10 websocket library.

@kdowney-cloudwallcapital

+1 Also in dependency hell due to this one. If it's not easy to upgrade, is it possible to make in an optional dependency, e.g. web3[websockets] or web3[all] includes this dependency but otherwise excluded?

@kclowes
Copy link
Collaborator

kclowes commented Jan 26, 2022

👀 Thanks for chiming in, everyone. It's on our list but it will be a little bit until we can get to it. If anyone has bandwidth to raise a PR in the meantime, we'd be happy to review. That's likely the fastest course of action. It looks like bumping to v10 results in a bunch of deprecation warnings around the loop parameter, but I haven't had time to dig into what the fix is for that.

@kdowney-cloudwallcapital

No bandwidth right now unfortunately, but we can push back our web3 integration to give you more time; may be more urgent for others. For reference: the relevant conflicts for us are the latest uvicorn ASGI server and the cryptofeed package. Both bumped to 10.x in recent versions and are critical to our stack.

@dbfreem
Copy link
Contributor

dbfreem commented Feb 9, 2022

@kclowes just out of curiosity is the plan to go ahead and remove the ability to pass in the event loop to the websocket provider or deprecate it for now. Here is the associated documentation about the ability to pass in an event loop being deprecated in websockets docs,. The websockets docs say to look at the python 3.10 release notes python release notes, at the bottom it talks about changes to get_event_loop

@kclowes
Copy link
Collaborator

kclowes commented Feb 9, 2022

I don't know yet. I think we'll probably deprecate in v5 and remove in v6, but I haven't really looked at it too hard.

@kclowes
Copy link
Collaborator

kclowes commented Feb 11, 2022

For anyone following along, I ended up taking out the loop parameter. I still need to deprecate in v5, which is tracked in #2344. Websockets v10 is a breaking change, so will only be available in v6. I'll plan to put out the first v6 beta release sometime next week with minimal breaking changes so that you can pin to that version if you need websockets v10.

@dino-rodriguez
Copy link

dino-rodriguez commented Mar 24, 2022

Hey guys, this still seems to be an issue. Can't use solana with web3. @kclowes What should we do here?

@kclowes
Copy link
Collaborator

kclowes commented Mar 30, 2022

@dino-rodriguez Try web3 v6.0.0-beta.1.

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 a pull request may close this issue.

7 participants