-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
DeprecationWarning for PEP 479 (generator_stop) #70324
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
Comments
PEP-479 says “Python 3.6: Non-silent deprecation warning” if “StopIteration bubbles out of a generator not under __future__ import”. Currently I see a PendingDeprecationWarning in this case; I guess this should be changed to DeprecationWarning in the 3.6 branch. |
I have submitted a patch. I have replace Can anyone please review? |
Have you tried running the test suite? I suspect there are tests that will fail. E.g. the tests in revision 2771a0ac806b would need to be changed over to DeprecationWarning as well. |
Yes @martin.panter, the tests were failing. But, I didn't know where the tests for PendingDeprecationWarning were added. Thanks for telling the changeset. I have updated the patch. Can you please have a look? |
FYI I found that changeset by doing annotate on the file that you originally changed <https://hg.python.org/cpython/annotate/default/Objects/genobject.c#l181\>, which is an index of the changesets that last modified each line. Thanks for the patch, I think it is generally good. Perhaps this also needs a short notice in What’s New, a bit like <https://docs.python.org/3/whatsnew/3.5.html#deprecated-python-behavior\>? |
Thanks @martin.panter. I learnt something new, I didn't know about annotate before. |
@martin.panter Any reviews for the patch? Is it ready to merge? |
Thanks for the updated patch. There are a couple minor problems with the What’s New entry, which you can fix if you want, or I could fix if I get around to merging it:
|
@martin.panter I have fixed the What's New docs. I have updated the patch. Thanks! |
New changeset 73f89182bb4d by Martin Panter in branch 'default': |
Thanks for your work Anish |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: