{{ message }}
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not accurate in Python 3.7+, since DeprecationWarning is not ignored by default in
__main__any more.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really much different?
I didn't say any different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In PEP 565, you used
asynckeyword example. It is really nice example to demonstrate what difference PEP 565 introduces.On the other hand, most reader of this document will not want to add new keyword. Most of them just want to deprecate their APIs that are not in
__main__.And, as you know, calling deprecated APIs from
__main__doesn't show warning by default.So there are no much difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling deprecated APIs from
__main__does show the warning as long as the stack level on the warning is correctly set to refer to the API caller's frame -asyncbecoming a keyword was just our motivation for finally doing something about the behaviour.For example: all of Serhiy's new warnings about parameters that are going to become positional only? Those will display if the caller is
__main__, as they setstacklevel=2in the warning call, so the filtering ends up being based on the caller's frame, not the frame making the call to the warnings module API.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wrong, I used Python 3.6 for testing it.
I still think it's not "much" difference. But if you don't like this phrase, how about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd drop the attention getting "Note" markup entirely, and simply reword the existing description with a comparison to DeprecationWarning:
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is still confusing for people doesn't know Python history.
It's still difficult to imagine what "expected to be deprecated".
I think DeprecationWarning is preferred for all deprecations. How about:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The direct cross-reference to
DeprecationWarningis probably worth keeping, so I'd amend the second paragraph a bit to add that back: