Add daphne to conformance test#40
Conversation
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
| break | ||
| print(line.decode("utf-8"), end="", file=sys.stderr) # noqa: T201 | ||
| yield line | ||
| except asyncio.CancelledError: |
There was a problem hiding this comment.
I had accidentally added this before I think. It ends up swallowing the error preventing terminate from being called on the subprocesses
| 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.
nit: should this also have "gunicorn" in the list?
There was a problem hiding this comment.
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.
should "daphne" be added to test_server_sync, above?
There was a problem hiding this comment.
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.
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.
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.