-
-
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
Breaking change in Websocket 6.0 release #1264
Comments
I can confirm this as well. I have an instance that is running |
Looks like this has already been picked up by someone on master, though on the latest 7.0 release those checks are missing. So this might be worth cherry picking those requirements into a point release to prevent those newly pip installing from getting a version of sanic with broken websockets, until sanic is updated to play nice with websockets>=6.0. |
Equally, ran across some more things that may help others.
# Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
sanic = "*"
websockets = "<5.0" # Sanic breaks on 6.0, pytest-sanic breaks on 5.0
[dev-packages]
pytest-sanic = "*"
[requires]
python_version = "3.6" # websockets 4.0 uses async keyword from python 3.7 |
I was able to get sanic master + websockets 6 to allow websocket connections with some small tweaks to sanic/websockets.py. |
the solution of james9837 worked for me! |
Attempt to fix issue related to sanic-org/sanic#1264
will this fixed be merge to the version ? |
@ashleysommer Could you make a minor release with these changes? Websocket support is completely broken otherwise. Thanks! |
I spent my weekend rebuilding my websocket gateway to run in websockets alone, and scraping sanic. It was not fun, but necessary because of this. Hopefully the sanic team will get around to the huge backlog and make a release soon. |
@rubik I'm not a sanic project owner or collaborator. I can't do releases. People have been wanting a new release to for months. Nothing I can do about it. |
@ahopkins, @rubik: I've been using the github version directly in my project which works fine. |
@garyo I appreciate that... but for a variety of reasons it's not an option for us. |
@ashleysommer Sorry, I was mistaken. Can we ping @r0fls then? |
@ahopkins Im replying to your comment in this thread: #1245 (comment) Inspired by this, a few weeks ago I created a new project. PyNecktie is serious Sanic for serious business. It literally just relies on Sanic master, and inherits and extends every class with new names to make it look like its not Sanic. It has its own small test suite to ensure it is working correctly. Its aimed at devs who want to pitch this tool to their boss for use in an upcoming project, while hopefully avoiding the stigma of Sanic. It advertises it self as a "High Performance Python 3 Microservices Framework" rather than a HTTP server in an attempt to appeal to a non-tech-savvy audience. |
@ashleysommer looks awesome... Checking it out now. |
Right now i have to fork sanic and include the patch from @james9837 to work properly, when you estimate that the 0.8 release will include that patch? |
I'm using python 3.7 for my project, and I want to use both sanic and websockets(for the websocket client). Problem is, pre-6.0 websockets client breaks in 3.7, so I need the 6.0 version. So I guess I can't use sanic(or use something else for the websocket client) until the next release. So looking forward to it. Anyway, thanks for the great work! |
This is addressed in PR#1304 |
Closing this with the merge of #1304 |
I can confirm problem persists with Python 3.7 and 3.6. I temporarily fixed the issue by downgrading websockets to |
The problem should not exist in 0.8.3 or 18.12LTS, can you provide example code you're using, along with platform so that I can test and verify? |
Hi,
Just pipenv installed sanic and it pulled down the new websocket 6.0 release. Making a simple websocket server will now throw a
AttributeError
on connection of a websocket client.Here's a simple websocket sanic app along with the stack trace.
Here's the stack trace produced:
The text was updated successfully, but these errors were encountered: