Do not hang forever if test server fails to start#3775
Open
akx wants to merge 2 commits intoencode:masterfrom
Open
Do not hang forever if test server fails to start#3775akx wants to merge 2 commits intoencode:masterfrom
akx wants to merge 2 commits intoencode:masterfrom
Conversation
76054c5 to
b7dd358
Compare
Contributor
|
@akx Thanks... I've shifted my development efforts over to this comprehensive redesign, due to it's significantly reduced complexity. See also HTTPX 1.0 design proposal docs in progress. For comparison... $ pip install httpx --pre
Downloading httpx-1.0.dev3-py3-none-any.whl (34 kB)
Downloading certifi-2026.1.4-py3-none-any.whl (152 kB)
Installing collected packages: certifi, httpx$ pip install httpx
Downloading httpx-0.28.1-py3-none-any.whl (73 kB)
Downloading httpcore-1.0.9-py3-none-any.whl (78 kB)
Downloading anyio-4.12.1-py3-none-any.whl (113 kB)
Downloading idna-3.11-py3-none-any.whl (71 kB)
Downloading certifi-2026.1.4-py3-none-any.whl (152 kB)
Downloading h11-0.16.0-py3-none-any.whl (37 kB)
Installing collected packages: idna, h11, certifi, httpcore, anyio, httpx$ pip install requests
Downloading requests-2.32.5-py3-none-any.whl (64 kB)
Downloading certifi-2026.1.4-py3-none-any.whl (152 kB)
Downloading charset_normalizer-3.4.4-cp313-cp313-macosx_10_13_universal2.whl (208 kB)
Downloading idna-3.11-py3-none-any.whl (71 kB)
Downloading urllib3-2.6.3-py3-none-any.whl (131 kB)
Installing collected packages: urllib3, idna, charset_normalizer, certifi, requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
I was wondering why the test suite just hung forever, and finally with
pytest tests/ -vvvx --log-cli-level=DEBUG -sI found that:– yep, I was working on something else on port 8000 – and so,
server.runningnever becomesTrue, and tests just hang.This PR:
server.run()(in the secondary thread) are caught and propagated immediately to the controlling loopChecklist