Skip to content

Commit 483bbf1

Browse files
authored
Enable wsgi streaming conformance tests with pyvoy (#51)
Signed-off-by: Anuraag Agrawal <[email protected]>
1 parent 0efb7b0 commit 483bbf1

File tree

4 files changed

+155
-27
lines changed

4 files changed

+155
-27
lines changed

conformance/test/server.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,12 @@ async def serve_gunicorn(
531531
cafile: str | None,
532532
port_future: asyncio.Future[int],
533533
):
534-
args = ["--bind=127.0.0.1:0", "--threads=40", "--reuse-port"]
534+
args = [
535+
"--bind=127.0.0.1:0",
536+
"--workers=4",
537+
"--worker-class=gevent",
538+
"--reuse-port",
539+
]
535540
if certfile:
536541
args.append(f"--certfile={certfile}")
537542
if keyfile:

conformance/test/test_server.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ def test_server_sync(server: str) -> None:
4545
args = maybe_patch_args_with_debug(
4646
[sys.executable, _server_py_path, "--mode", "sync", "--server", server]
4747
)
48-
opts = [
49-
# TODO: Enable full-duplex in pyvoy
50-
"--skip",
51-
"**/bidi-stream/full-duplex/**",
52-
]
48+
opts = []
5349
match server:
5450
case "gunicorn":
5551
# gunicorn doesn't support HTTP/2

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ dev = [
4343
"httpx[http2]==0.28.1",
4444
"hypercorn==0.17.3",
4545
"granian==2.5.7",
46-
"gunicorn==23.0.0",
46+
"gunicorn[gevent]==23.0.0",
4747
"just-bin==1.42.4; sys_platform != 'win32'",
4848
"mkdocs==1.6.1",
4949
"mkdocs-material==9.6.20",
@@ -53,7 +53,7 @@ dev = [
5353
"pytest-asyncio==1.2.0",
5454
"pytest-cov==7.0.0",
5555
"pytest-timeout==2.4.0",
56-
"pyvoy==0.1.1; sys_platform != 'win32'",
56+
"pyvoy==0.1.2; sys_platform != 'win32'",
5757
"ruff~=0.13.2",
5858
"uvicorn==0.37.0",
5959
# Needed to enable HTTP/2 in daphne

0 commit comments

Comments
 (0)