-
-
Notifications
You must be signed in to change notification settings - Fork 542
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
(dev server) support for Subscriptions requires uvicorn[standard]
#586
Comments
Can we create an [tool.poetry.dependencies]
uvicorn = ">=0.11.6,<0.13.0"
uvicorn_standard = { version = ">=0.11.6,<0.13.0", extras = ["standard"], optional = true }
[tool.poetry.extras]
subscriptions = ["uvicorn_standard"] I agree that better documentation is needed regardless. |
Oh, that would absolutely work!
…On Wed, Nov 18, 2020 at 18:05 ignormies ***@***.***> wrote:
Can we create an extras group that includes uvicorn[standard]? Does
poetry support this?
[tool.poetry.dependencies]uvicorn = ">=0.11.6,<0.13.0"uvicorn_standard = { version = ">=0.11.6,<0.13.0", extras = ["standard"], optional = true }
[tool.poetry.extras]subscriptions = ["uvicorn_standard"]
I agree that better documentation is needed regardless.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#586 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB7PL3YHRX6RXSTEAORWI3SQRONJANCNFSM4T2VWX3A>
.
|
Wait just realized a flaw here. uvicorn_standard = { version = ">=0.11.6,<0.13.0", extras = ["standard"], optional = true } Not sure if poetry supports aliases |
What about making the whole debug server optional as well? So if you want to use the debug server you'd need to run:
or something similar? Then we can provide all the dependencies we need :) I'm a bit worried that this might not be really user friendly though |
+1 on making the debug server optional. I use Strawberry with Django in my project and don't need the extra things that Strawberry requires to host the debug server. |
+1 on making the debug server optional as well. We host a strawberry with django server in AWS lambda, and the smaller the packaged up system is, the faster it loads |
That makes things easier for sure; they’re can be a couple of extras:
* debug-server
* debug-server-ws
Allowing for the inclusion of Cython if necessary. It does complicate the
0-60 installation somewhat so I’m still interested in hearing whether this
is a good change in the spirit of the v1 roadmap which talks about making
getting going easy:
#268
…On Thu, Nov 19, 2020 at 06:36 lijok ***@***.***> wrote:
+1 on making the debug server optional as well. We host a strawberry with
django server in AWS lambda, and the smaller the packaged up system is, the
faster it loads
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#586 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB7PL3DXTIHJSAX2BLWBGDSQUGLFANCNFSM4T2VWX3A>
.
|
To use
Subscription
websockets are required, to enable websockets you need to installuvicorn[standard]
. Currentlypyproject.toml
/poetry
is only installinguvicorn
. Not having the "standard" extra results in a failure to upgrade the HTTP request to WebSocket, you can see this by increasing the uvicorn log_level incli/commands/server.py
and attempting a Subscription.I see two paths to improving this situation, I'm happy to submit a PR for either route - but I need advice on how to proceed 👍
Option 1: update dependencies in pyproject.toml
Changing the
uvicorn
dependency to be{version = ">=0.11.6,<0.13.0", extras = ["standard"]}
would result in websockets being supported. However as per Uvicorn's QuickStart that brings in Cython dependencies which may not be what folks want.Option 2: improve documentation to mention this requirement
The safe route, at the risk of a bit more work for the user. It's likely that any "real" deployment would have folks needing to be a bit more opinionated about the way they run their ASGI sever.
The text was updated successfully, but these errors were encountered: