This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Document warnings.WarningMessage ?
Type: Stage:
Components: Documentation Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: blueyed, docs@python, remi.lapeyre, vstinner
Priority: normal Keywords:

Created on 2020-03-09 14:35 by blueyed, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg363735 - (view) Author: daniel hahler (blueyed) * Date: 2020-03-09 14:35
I've noticed that `warnings.WarningMessage` is not documented, i.e. it does not show up in the intersphinx object list.

I'm not sure how to document it best, but maybe just describing its attributes?

Ref: https://github.com/blueyed/cpython/blob/598d29c51c7b5a77f71eed0f615eb0b3865a4085/Lib/warnings.py#L398-L417
msg363739 - (view) Author: Rémi Lapeyre (remi.lapeyre) * Date: 2020-03-09 14:54
warnings.WarningMessage was added in https://bugs.python.org/issue26568 at the same time than _showwarnmsg_impl() and _formatwarnmsg_impl().

The goal was to have public functions that took them instead of multiple arguments so it could be easily extended in the future. It looks like it never happened and as of today there is no way to use warnings.WarningMessage in user code.

Maybe it is time to bikeshed the names and add them?
History
Date User Action Args
2022-04-11 14:59:27adminsetgithub: 84094
2020-03-09 14:54:03remi.lapeyresetnosy: + vstinner, remi.lapeyre
messages: + msg363739
2020-03-09 14:35:53blueyedcreate