msg258448 - (view) |
Author: Martin Panter (martin.panter) *  |
Date: 2016-01-17 03:31 |
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. |
|
|
msg259407 - (view) |
Author: Anish Shah (anish.shah) * |
Date: 2016-02-02 17:33 |
I have submitted a patch. I have replace `PyExc_PendingDeprecationWarning` to `PyExc_DeprecationWarning` in Objects/genobject.c Can anyone please review? |
|
|
msg259454 - (view) |
Author: Martin Panter (martin.panter) *  |
Date: 2016-02-03 03:11 |
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. |
|
|
msg259489 - (view) |
Author: Anish Shah (anish.shah) * |
Date: 2016-02-03 16:22 |
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? |
|
|
msg259529 - (view) |
Author: Martin Panter (martin.panter) *  |
Date: 2016-02-04 03:43 |
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>? |
|
|
msg259536 - (view) |
Author: Anish Shah (anish.shah) * |
Date: 2016-02-04 07:15 |
Thanks @martin.panter. I learnt something new, I didn't know about annotate before. I have updated the patch. Thanks again. |
|
|
msg259735 - (view) |
Author: Anish Shah (anish.shah) * |
Date: 2016-02-06 17:06 |
@martin.panter Any reviews for the patch? Is it ready to merge? |
|
|
msg259759 - (view) |
Author: Martin Panter (martin.panter) *  |
Date: 2016-02-07 03:41 |
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: * Bullet point should probably be wrapped onto multiple lines * According to the 3.5 What’s New, the DeprecationWarning is “non-silent”, but I would just drop the “silent” attribute (Once upon a time in Python 2, DeprecationWarning was apparently enabled by default, in constrast with PendingDeprecationWarning, which was silenced by default.) * Change “which will trigger a RuntimeError” → “and will trigger . . .” * Missing full stop at the end |
|
|
msg259763 - (view) |
Author: Anish Shah (anish.shah) * |
Date: 2016-02-07 05:46 |
@martin.panter I have fixed the What's New docs. I have updated the patch. Thanks! |
|
|
msg259977 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2016-02-10 05:22 |
New changeset 73f89182bb4d by Martin Panter in branch 'default': Issue #26136: Upgrade the generator_stop warning to DeprecationWarning https://hg.python.org/cpython/rev/73f89182bb4d |
|
|
msg259984 - (view) |
Author: Martin Panter (martin.panter) *  |
Date: 2016-02-10 06:42 |
Thanks for your work Anish |
|
|