This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: DeprecationWarning for PEP 479 (generator_stop)
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: anish.shah, ezio.melotti, martin.panter, python-dev
Priority: normal Keywords: easy, patch

Created on 2016-01-17 03:31 by martin.panter, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit
issue26136_20160202.patch anish.shah, 2016-02-02 17:33 review
issue26136_20160203.patch anish.shah, 2016-02-03 16:22 review
issue26136_20160204.patch anish.shah, 2016-02-04 07:15 review
issue26136_20160207.patch anish.shah, 2016-02-07 05:46 review
Messages (11)
msg258448 - (view) Author: Martin Panter (martin.panter) * (Python committer) 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) * (Python committer) 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) * (Python committer) Date: 2016-02-04 03:43
FYI I found that changeset by doing annotate on the file that you originally changed <>, 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 <>?
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) * (Python committer) 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) (Python triager) Date: 2016-02-10 05:22
New changeset 73f89182bb4d by Martin Panter in branch 'default':
Issue #26136: Upgrade the generator_stop warning to DeprecationWarning
msg259984 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-02-10 06:42
Thanks for your work Anish
Date User Action Args
2022-04-11 14:58:26adminsetgithub: 70324
2016-02-10 06:42:13martin.pantersetstatus: open -> closed
resolution: fixed
messages: + msg259984

stage: patch review -> resolved
2016-02-10 05:22:31python-devsetnosy: + python-dev
messages: + msg259977
2016-02-07 05:46:44anish.shahsetfiles: + issue26136_20160207.patch

messages: + msg259763
2016-02-07 03:41:26martin.pantersetmessages: + msg259759
2016-02-06 17:06:32anish.shahsetmessages: + msg259735
2016-02-04 07:15:21anish.shahsetfiles: + issue26136_20160204.patch

messages: + msg259536
2016-02-04 03:43:36martin.pantersetmessages: + msg259529
2016-02-03 16:22:38anish.shahsetfiles: + issue26136_20160203.patch

messages: + msg259489
2016-02-03 03:11:00martin.pantersetmessages: + msg259454
stage: needs patch -> patch review
2016-02-02 17:33:45anish.shahsetfiles: + issue26136_20160202.patch
keywords: + patch
messages: + msg259407
2016-02-02 11:54:07anish.shahsetnosy: + anish.shah
2016-01-28 13:03:37ezio.melottisetkeywords: + easy
nosy: + ezio.melotti
2016-01-17 03:31:19martin.pantercreate