Skip to content

[PR #15296/08017d9a backport][9.2.x] Accept numeric strings for verbosity options in TOML again, with a deprecation - #15339

Open
patchback[bot] wants to merge 1 commit into
9.2.xfrom
patchback/backports/9.2.x/08017d9ada4c72a7b6a78f7873c238070e24c982/pr-15296
Open

patchback[bot] wants to merge 1 commit into
9.2.xfrom
patchback/backports/9.2.x/08017d9ada4c72a7b6a78f7873c238070e24c982/pr-15296

Conversation

@patchback

@patchback patchback Bot commented Nov 5, 2026

Copy link
Copy Markdown

This is a backport of PR #15296 as merged into main (08017d9).

Requested by Ronny · project thread

🤖 Written by Claude Opus 5.5 via Claude Code for the pytest maintainers; I prompted it, it did the work, I read it.

Closes #15290.

#15153 made numeric strings like verbosity_assertions = "2" a hard error in native TOML, with no deprecation period. With this PR they are accepted again, with a deprecation warning:

  • The verbosity_* options and tmp_path_retention_count accept numeric strings in TOML again and issue one PytestRemovedIn10Warning per option. ini files are not affected.

  • Values that are neither an int nor "auto" raise a UsageError from get_verbosity.

  • The deprecation is documented in deprecations.rst#toml-numeric-strings, and the PR adds bugfix and deprecation changelog entries.

  • Tests

  • Changelog

  • AI agents credited in Co-authored-by trailers

Accept numeric strings for verbosity options in TOML again, with a deprecation

(cherry picked from commit 08017d9)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant