Repository navigation
Accept native TOML numbers for faulthandler_timeout - #15133
Merged
RonnyPfannschmidt merged 1 commit intoOct 9, 2026
Merged
Conversation
RonnyPfannschmidt
approved these changes
Oct 5, 2026
4 tasks done
SemTiOne
pushed a commit
to SemTiOne/pytest
that referenced
this pull request
Oct 9, 2026
Follow-up to pytest-dev#14692, pytest-dev#14954 and pytest-dev#15133: the remaining options whose values are naturally numbers or booleans were still registered as plain strings, so native TOML configs had to quote them. - verbosity_assertions, verbosity_test_cases, verbosity_subtests: int | Literal["auto"] - tmp_path_retention_count: int | str - log_level, log_cli_level, log_file_level: int | str; int levels are now handled directly and an int 0 (NOTSET) still counts as set - log_auto_indent: int | bool | str - log_file_mode: Literal["w", "a"] (an invalid value was an INTERNALERROR) - parametrize_long_str_id_strategy: its Literal choices The reference docs drop the "must be quoted in TOML" notes, fix the minversion TOML example (a float there is rejected), fix copy-pasted log_cli_level examples, and refresh the --help dump. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KnFJBdcVQB59PKYw3q1w7X
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.
Closes #15132
Summary
faulthandler_timeoutis documented as a float and supports native TOML configuration, but numeric TOML values were rejected because the option was registered without a type. Register it asfloat | strso native TOML numbers and existing string values are accepted.The regression test covers integer, float, and quoted-string TOML values.
Testing
uv run --project . pytest --basetemp .test-tmp -q testing/test_faulthandler.pyuvx pre-commit run --files src/_pytest/faulthandler.py testing/test_faulthandler.py AUTHORS changelog/15132.bugfix.rst