Repository navigation
fix: prevent internal errors from non-finite rerun delays - #391
Arham-Begani wants to merge 1 commit into
Conversation
|
Could a maintainer approve the pending upstream Actions runs when convenient? The submitted head is Upstream CI approval and code review are still pending. The PR's existing description separates these fork results from upstream validation and records the 16 before/after regressions. No source changes were made for this follow-up. This comment was prepared with OpenAI Codex assistance. |
|
Following up on the October 19 authorization request for Could an authorized maintainer approve fork CI when convenient? The earlier fork-validation evidence is linked in the October 19 update; upstream validation is still pending and the source is unchanged. This follow-up was prepared with AI assistance. |
Closes #390.
Problem
float()and the CLI's float argument parser accept NaN and infinity. The delay getters currently reject negative values but pass these non-finite values to the retry calculation andtime.sleep, aborting the session with INTERNALERROR / exit code 3.For example, a test that passes on its third execution never completes with
--reruns 2 --reruns-delay=nan. Both non-finite delay values and non-finite backoff factors reproduce the problem. See #390 for four real-sleep commands and observed exceptions.Changes
The retry formula is unchanged. This fixes explicit non-finite input; it does not duplicate #389's separate large-finite-factor overflow fix.
Validation
Windows, CPython 3.13.15, pytest 9.1.1, pytest-xdist 3.8.0:
01fd226bd533ecd7f6aabe7c155c4ca7bcd8598c; all 16 pass with this patch.time.sleepreproductions changed from INTERNALERROR / exit 3 to1 passed, 2 rerun/ exit 0.pytest -vv -o faulthandler_timeout=30 tests/). An initial quiet run stopped making progress and was terminated; the diagnostic rerun completed without failures or timeout traces in 83.14 seconds.pre-commit run --all-files --show-diff-on-failurechecks passed; commit hooks passed on changed files.towncrier check --compare-with origin/masterandgit diff --checkpassed.--ignore-missing-imports. Without that flag, this environment reports missing imports forexceptiongroupand_pytest.nodeid; this is not claimed as a clean unrestricted type check.Fork CI at the submitted commit
a2494ae697fbc2fe439cc4b0538ff3877ded4423completed successfully: all 41 test jobs passed, covering the Python/pytest matrix, PyPy, xdist, free-threaded Python, Linux, Windows and macOS. The docs workflow also passed. Results:Upstream Actions currently reports
action_requiredfor its four workflows and needs maintainer approval to run. The upstream Read the Docs preview passed. Fork success is reported separately from upstream CI and maintainer acceptance.AI assistance
An AI coding assistant investigated, implemented, tested and drafted this contribution with the account owner's authorization. No personal human review or authorship certification is claimed. Maintainer review is welcome.