-
Notifications
You must be signed in to change notification settings - Fork 3
Add daphne to conformance test #40
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
Conversation
Signed-off-by: Anuraag Agrawal <[email protected]>
| break | ||
| print(line.decode("utf-8"), end="", file=sys.stderr) # noqa: T201 | ||
| yield line | ||
| except asyncio.CancelledError: |
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.
I had accidentally added this before I think. It ends up swallowing the error preventing terminate from being called on the subprocesses
conformance/test/server.py
Outdated
| class Args(argparse.Namespace): | ||
| mode: Literal["sync", "async"] | ||
| server: Literal["granian", "hypercorn", "uvicorn"] | ||
| server: Literal["daphne", "granian", "hypercorn", "uvicorn"] |
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.
nit: should this also have "gunicorn" in the list?
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.
Yeah I guess there's something causing pyright to not flag this
|
|
||
|
|
||
| @pytest.mark.parametrize("server", ["granian", "hypercorn", "uvicorn"]) | ||
| @pytest.mark.parametrize("server", ["daphne", "granian", "hypercorn", "uvicorn"]) |
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.
should "daphne" be added to test_server_sync, above?
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.
Daphne doesn't support wsgi so only async.
| "pytest-cov==7.0.0", | ||
| "ruff~=0.13.2", | ||
| "uvicorn==0.37.0", | ||
| "Twisted[tls,http2]==25.5.0", |
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.
does daphne dep on a lower version of twisted? (oh, ah, I guess it's for http2 support: https://github.com/django/daphne?tab=readme-ov-file#http2-support)
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.
Will add a comment
Trying to find a full-duplex capable server that reliably passes our tests, gave daphne a try. I was optimistic since it supports websockets, but it turns out that their http protocol is completely separate and doesn't support bidi... Oh well, having added the test figured it's worth running it as an option for the others.