Repository navigation
Conversation
Traverse exception contexts iteratively and stop before revisiting an exception so error reporting cannot fail with RecursionError. Tested: 29 error and exit-status tests; full repository flake8; git diff --check. Not-tested: Full test suite and non-Linux platforms.
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.
Long exception context chains currently raise
RecursionErrorinside HTTPie’s connection-error handler instead of displaying the original error. Cyclic contexts have the same failure mode.This change walks contexts iteratively and stops before revisiting an exception. Ordinary chains still return the deepest
Exception, and aBaseExceptioncontext remains a stopping point. It adds regression cases for deep chains, one-/two-/three-node cycles, and DNS error reporting through the CLI, plus an unreleased changelog entry. No dependencies are added.Validation on Linux / Python 3.10:
python -m pytest tests/test_errors.py tests/test_exit_status.py --tb=no -q— 29 passed.flake8andgit diff --checkpassed.Prepared and tested with OpenAI Codex assistance.
CI follow-up: the Code Style job fails during Python setup because Python 3.9 is unavailable on its current Ubuntu 26.04 runner. The coverage run reports two Big5 charset-detection failures. Running the Big5 subset against the unchanged base commit
5b604c3with the same local environment reproduces those two failures (2 failed, 10 passed), before this patch is applied. These unrelated workflow/encoding changes are outside this PR.