Skip to content

bpo-19225: Remove duplicated description for standard warning categories#1068

Merged
berkerpeksag merged 3 commits into
python:masterfrom
cocoatomo:duplicated-warning-description
Apr 15, 2017
Merged

bpo-19225: Remove duplicated description for standard warning categories#1068
berkerpeksag merged 3 commits into
python:masterfrom
cocoatomo:duplicated-warning-description

Conversation

@cocoatomo

Copy link
Copy Markdown
Contributor

see bpo-19225.

@mention-bot

Copy link
Copy Markdown

@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.

Comment thread Doc/c-api/exceptions.rst
: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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the last sentence should be kept here or added to the Standard Warning Categories section (if it already is not duplicated anywhere).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sentence at the bottom line seems to say the same meaning.

This is a base class for other standard warning categories.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But is it documented that PyExc_Warning is a subclass of PyExc_Exception?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated the PR.

@cocoatomo

Copy link
Copy Markdown
Contributor Author

@serhiy-storchaka Is this PR ready to merge?

Comment thread Doc/c-api/exceptions.rst Outdated
: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

@serhiy-storchaka serhiy-storchaka Apr 12, 2017

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

: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.

Comment thread Doc/c-api/exceptions.rst Outdated
: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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:c:data:'PyErr_RuntimeWarning', not :c:data:'RuntimeWarning'.

Comment thread Doc/c-api/exceptions.rst Outdated
: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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Their names" -- that are not all names. Only names of the standard Python warning categories.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe: "The standard Python warning categories are available as global variables whose names are enumerated at...".

@cocoatomo

Copy link
Copy Markdown
Contributor Author

@serhiy-storchaka Thank you for the comments. I updated the PR.

@serhiy-storchaka serhiy-storchaka added docs Documentation in the Doc dir needs backport to 2.7 labels Apr 13, 2017
@berkerpeksag berkerpeksag merged commit eaeda64 into python:master Apr 15, 2017
@berkerpeksag

Copy link
Copy Markdown
Member

Thanks! I will do the backporting stuff tomorrow.

@cocoatomo

Copy link
Copy Markdown
Contributor Author

@berkerpeksag Would it bother you if I created backporting PRs?

@berkerpeksag

Copy link
Copy Markdown
Member

@cocoatomo not at all, go for it! :)

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

Successfully merging this pull request may close these issues.

6 participants