]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-125854: Improve error messages for invalid category in the warnings module (GH...
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 14 Aug 2025 11:59:04 +0000 (14:59 +0300)
committerGitHub <noreply@github.com>
Thu, 14 Aug 2025 11:59:04 +0000 (14:59 +0300)
commitc47ffbf1a3615efac58a6ec0238929ac3c65bfea
tree5a3e34f5dcaf3887148b7ea8e53d78d5600a52b7
parent2a6888ea149f66031efc12dfa019ecfedb58410e
gh-125854: Improve error messages for invalid category in the warnings module (GH-137750)

Include the type name if the category is a type, but not a Warning
subclass, instead of just 'type'.
Lib/_py_warnings.py
Lib/test/test_warnings/__init__.py
Misc/NEWS.d/next/Library/2025-08-14-10-27-07.gh-issue-125854.vDzFcZ.rst [new file with mode: 0644]
Python/_warnings.c