bpo-19225: Remove duplicated description for standard warning categories#1068
Conversation
|
@cocoatomo, thanks for your PR! By analyzing the history of the files in this pull request, we identified @birkenfeld, @DanielStutzbach and @benjaminp to be potential reviewers. |
| :c:data:`PyExc_UnicodeWarning`, :c:data:`PyExc_DeprecationWarning`, | ||
| :c:data:`PyExc_SyntaxWarning`, :c:data:`PyExc_RuntimeWarning`, and | ||
| :c:data:`PyExc_FutureWarning`. :c:data:`PyExc_Warning` is a subclass of | ||
| :c:data:`PyExc_Exception`; the other warning categories are subclasses of |
There was a problem hiding this comment.
Perhaps the last sentence should be kept here or added to the Standard Warning Categories section (if it already is not duplicated anywhere).
There was a problem hiding this comment.
The sentence at the bottom line seems to say the same meaning.
This is a base class for other standard warning categories.
There was a problem hiding this comment.
But is it documented that PyExc_Warning is a subclass of PyExc_Exception?
There was a problem hiding this comment.
No, it isn't. So, that sentence should be put somewhere around the paragraph or Standard Warning Categories section.
It seems suitable for that sentence to sit at the beginning of the paragraph, doesn't it?
There was a problem hiding this comment.
I have updated the PR.
|
@serhiy-storchaka Is this PR ready to merge? |
| :c:data:`PyExc_Exception`; the other warning categories are subclasses of | ||
| :c:data:`PyExc_Warning`. | ||
| :c:data:`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`; | ||
| warning categories must be subclasses of :c:data:`Warning`; the default warning |
There was a problem hiding this comment.
:c:data:'PyExc_Warning', not :c:data:'Warning'.
I think that the fact that PyExc_Warning is a subclass of PyExc_Exception should be mentioned after saying that warning categories must be subclasses of PyExc_Warning.
| :c:data:`PyExc_Warning`. | ||
| :c:data:`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`; | ||
| warning categories must be subclasses of :c:data:`Warning`; the default warning | ||
| category is :c:data:`RuntimeWarning`. Their names are enumerated at |
There was a problem hiding this comment.
:c:data:'PyErr_RuntimeWarning', not :c:data:'RuntimeWarning'.
| :c:data:`PyExc_Warning`. | ||
| :c:data:`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`; | ||
| warning categories must be subclasses of :c:data:`Warning`; the default warning | ||
| category is :c:data:`RuntimeWarning`. Their names are enumerated at |
There was a problem hiding this comment.
"Their names" -- that are not all names. Only names of the standard Python warning categories.
There was a problem hiding this comment.
Maybe: "The standard Python warning categories are available as global variables whose names are enumerated at...".
|
@serhiy-storchaka Thank you for the comments. I updated the PR. |
|
Thanks! I will do the backporting stuff tomorrow. |
|
@berkerpeksag Would it bother you if I created backporting PRs? |
|
@cocoatomo not at all, go for it! :) |
see bpo-19225.