[New-bugs-announce] [issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

Nick Coghlan report at bugs.python.org
Tue May 19 13:16:20 CEST 2015


New submission from Nick Coghlan:

>From the StopIteration-in-generators handling transition plan (https://www.python.org/dev/peps/pep-0479/#transition-plan):

* Python 3.5: Enable new semantics under __future__ import; silent deprecation warning if StopIteration bubbles out of a generator not under __future__ import. 

The first half of that was implemented in issue 22906, but we missed the second half.

The reason the latter is needed is so that people can turn the DeprecationWarning into an error to test for compatibility with the future default behaviour without needing to add the new future flag to their code (which would break compatibility with older Python versions). Ram Rachum pointed out the absence on python-ideas: https://mail.python.org/pipermail/python-ideas/2015-May/033580.html

----------
messages: 243576
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: PEP 479: missing DeprecationWarning when generator_stop is not used

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24237>
_______________________________________


More information about the New-bugs-announce mailing list