Repository navigation
Conversation
This was referenced Oct 18, 2026
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.
Fixes #388.
With zero rerun delay and a large positive finite backoff factor, exponentiation can raise before multiplication by zero, aborting pytest before the configured retries complete. Skip exponentiation when the effective delay is zero and keep one
time.sleep(0)call per retry. The nonzero-delay formula is unchanged.Reproduction on unmodified master
01fd226bd533ecd7f6aabe7c155c4ca7bcd8598c(macOS arm64, CPython 3.14.8 / pytest 9.1.1):Before: three attempts,
2 rerun,INTERNALERROR> OverflowError: (34, 'Result too large'), exit 3. After: four attempts,1 passed, 3 rerun, exit 0. Both reproductions used real sleep calls.1e308is finite; this is an edge case involving an unusually large factor. Nonzero-delay overflow remains outside this fix.Add a regression that checks fourth-attempt recovery and three zero sleeps, plus the issue-numbered changelog fragment.
Validation on macOS arm64, CPython 3.14.8 / pytest 9.1.1, with pytest-xdist 3.8.0 installed:
1 passed, 3 rerun, exit 0.git diff --check, Towncrier draft rendering, andtowncrier check --compare-with 01fd226bd533ecd7f6aabe7c155c4ca7bcd8598con the committed branch passed; the fragment links to Zero rerun delay can abort with OverflowError for a large finite backoff factor #388.AI assistants were used for the investigation, reproduction, tests, review, and drafting with the account owner's authorization. The independent review was by an AI assistant; human maintainer review is pending. The full supported Python/pytest matrix, Linux/Windows, PyPy, free-threaded Python, and docs/package builds were not run locally for this patch. Hosted CI results will be reported by GitHub.