diff --git a/httpcore/_backends/trio.py b/httpcore/_backends/trio.py index a6b6ab806..8fba6435f 100644 --- a/httpcore/_backends/trio.py +++ b/httpcore/_backends/trio.py @@ -82,7 +82,7 @@ def get_extra_info(self, info: str) -> Any: if info == "ssl_object" and isinstance(self._stream, trio.SSLStream): # Type checkers cannot see `_ssl_object` attribute because trio._ssl.SSLStream uses __getattr__/__setattr__. # Tracked at https://github.com/python-trio/trio/issues/542 - return self._stream._ssl_object # type: ignore[attr-defined] + return self._stream._ssl_object if info == "client_addr": return self._get_socket_stream().socket.getsockname() if info == "server_addr": diff --git a/requirements.txt b/requirements.txt index ba9471708..9df235dea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,15 +16,7 @@ twine==5.1.1 coverage[toml]==7.5.4 ruff==0.5.0 mypy==1.10.1 -trio-typing==0.10.0 pytest==8.2.2 pytest-httpbin==2.0.0 pytest-trio==0.8.0 werkzeug<3.1 # See: https://github.com/psf/httpbin/issues/35 - -# Benchmarking and profiling -uvicorn==0.30.1 -aiohttp==3.10.2 -urllib3==2.2.2 -matplotlib==3.7.5 -pyinstrument==4.6.2 diff --git a/tests/benchmark/client.py b/scripts/bench/client.py similarity index 100% rename from tests/benchmark/client.py rename to scripts/bench/client.py diff --git a/tests/benchmark/server.py b/scripts/bench/server.py similarity index 100% rename from tests/benchmark/server.py rename to scripts/bench/server.py diff --git a/scripts/benchmark b/scripts/benchmark index c6cfff210..8b59ab2f8 100755 --- a/scripts/benchmark +++ b/scripts/benchmark @@ -9,9 +9,9 @@ fi set -x -${PREFIX}python tests/benchmark/server.py & +${PREFIX}python scripts/bench/server.py & SERVER_PID=$! EXIT_CODE=0 -${PREFIX}python tests/benchmark/client.py "$@" || EXIT_CODE=$? +${PREFIX}python scripts/bench/client.py "$@" || EXIT_CODE=$? kill $SERVER_PID exit $EXIT_CODE