Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document warnings.WarningMessage ? #84094

Open
blueyed mannequin opened this issue Mar 9, 2020 · 2 comments
Open

Document warnings.WarningMessage ? #84094

blueyed mannequin opened this issue Mar 9, 2020 · 2 comments
Labels
docs Documentation in the Doc dir

Comments

@blueyed
Copy link
Mannequin

blueyed mannequin commented Mar 9, 2020

BPO 39913
Nosy @vstinner, @blueyed, @remilapeyre

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2020-03-09.14:35:53.008>
labels = ['docs']
title = 'Document warnings.WarningMessage ?'
updated_at = <Date 2020-03-09.14:54:03.663>
user = 'https://github.com/blueyed'

bugs.python.org fields:

activity = <Date 2020-03-09.14:54:03.663>
actor = 'remi.lapeyre'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2020-03-09.14:35:53.008>
creator = 'blueyed'
dependencies = []
files = []
hgrepos = []
issue_num = 39913
keywords = []
message_count = 2.0
messages = ['363735', '363739']
nosy_count = 4.0
nosy_names = ['vstinner', 'blueyed', 'docs@python', 'remi.lapeyre']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue39913'
versions = []

@blueyed
Copy link
Mannequin Author

blueyed mannequin commented Mar 9, 2020

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

@blueyed blueyed mannequin assigned docspython Mar 9, 2020
@blueyed blueyed mannequin added the docs Documentation in the Doc dir label Mar 9, 2020
@blueyed blueyed mannequin assigned docspython Mar 9, 2020
@blueyed blueyed mannequin added the docs Documentation in the Doc dir label Mar 9, 2020
@remilapeyre
Copy link
Mannequin

remilapeyre mannequin commented Mar 9, 2020

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?

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

0 participants