-
Notifications
You must be signed in to change notification settings - Fork 5
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,13 +87,23 @@ def test_server_sync(server: str) -> None: | |
| pytest.fail(f"\n{result.stdout}\n{result.stderr}") | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("server", ["granian", "hypercorn", "uvicorn"]) | ||
| @pytest.mark.parametrize("server", ["daphne", "granian", "hypercorn", "uvicorn"]) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Daphne doesn't support wsgi so only async. |
||
| def test_server_async(server: str) -> None: | ||
| args = maybe_patch_args_with_debug( | ||
| [sys.executable, _server_py_path, "--mode", "async", "--server", server] | ||
| ) | ||
| opts = [] | ||
| match server: | ||
| case "daphne": | ||
| opts = [ | ||
| # daphne doesn't support h2c | ||
| "--skip", | ||
| "**/HTTPVersion:2/**/TLS:false/**", | ||
| # daphne seems to block on the request body so can't do full duplex even with h2, | ||
| # it only works with websockets | ||
| "--skip", | ||
| "**/full-duplex/**", | ||
| ] | ||
| case "granian" | "hypercorn": | ||
| # granian and hypercorn seem to have issues with concurrency | ||
| opts = ["--parallel", "1"] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,7 @@ dev = [ | |
| "asgiref==3.9.1", | ||
| "brotli==1.1.0", | ||
| "connect-python-example", | ||
| "daphne==4.2.1", | ||
| "httpx[http2]==0.28.1", | ||
| "hypercorn==0.17.3", | ||
| "granian==2.5.5", | ||
|
|
@@ -53,6 +54,8 @@ dev = [ | |
| "pytest-cov==7.0.0", | ||
| "ruff~=0.13.2", | ||
| "uvicorn==0.37.0", | ||
| # Needed to enable HTTP/2 in daphne | ||
| "Twisted[tls,http2]==25.5.0", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will add a comment |
||
| "typing_extensions==4.15.0", | ||
| "zstandard==0.25.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.
I had accidentally added this before I think. It ends up swallowing the error preventing
terminatefrom being called on the subprocesses