[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-22 Thread Yury Selivanov
Yury Selivanov added the comment: Nick, I updated the code to use assertWarnsRegex (thanks for suggestion, Berker!) Closing the issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2771a0ac806b by Yury Selivanov in branch 'default': Issue 24237: Raise PendingDeprecationWarning per PEP 479 https://hg.python.org/cpython/rev/2771a0ac806b -- nosy: +python-dev ___ Python tracker

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-22 Thread Berker Peksag
Berker Peksag added the comment: Another alternative is using assertWarnsRegex. -- nosy: +berker.peksag ___ Python tracker ___ ___ Pyt

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-21 Thread Nick Coghlan
Nick Coghlan added the comment: The patch mostly looks good to me, but I suggest using "test.support.check_warnings" for the cases where you're checking that the warning is raised as expected: https://docs.python.org/3/library/test.html#test.support.check_warnings It's slightly simpler than c

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-21 Thread Yury Selivanov
Yury Selivanov added the comment: Nick, I've updated the patch to address all PendingDeprecationWarnings related to the PEP 479 in the test suite. -- Added file: http://bugs.python.org/file39457/gen_stop_warn.patch ___ Python tracker

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-21 Thread Yury Selivanov
Yury Selivanov added the comment: > Why the switch to WriteUnraisable? After adding a unittest for the patch it became clear that it was indeed unnecessary ;) Please see the new patch. -- Added file: http://bugs.python.org/file39454/gen_stop_warn.patch ___

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-21 Thread Nick Coghlan
Nick Coghlan added the comment: Why the switch to WriteUnraisable? Unlike __del__ methods and similar operations that may be invoked at arbitrary points, there's nothing stopping us from emitting an exception here - indeed, we're *already* handling an exception. Getting a hard failure on depre

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-20 Thread Yury Selivanov
Yury Selivanov added the comment: > Are there really all that many warnings triggered for PEP 479? Actually, with the attached patch the number of warnings is pretty low, we can definitely fix/silence them where necessary. (I think I had a bug in one of my first patches that triggered some fa

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-20 Thread Yury Selivanov
Yury Selivanov added the comment: Had to regenerate the patch. Fixed some typos + now I use PyErr_WriteUnraisable if PyErr_WarnFormat returns non-zero. And yeah, PendingDeprecationWarning is a better choice. -- Added file: http://bugs.python.org/file39444/gen_stop_warn.patch _

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-20 Thread Nick Coghlan
Nick Coghlan added the comment: Given the two-release deprecation cycle, would it be worth using PendingDeprecationWarning here? That way folks that only turned on DeprecationWarning (rather than -Wall) wouldn't need to worry about this until 3.6. As far as our own test suite goes, when Resou

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-20 Thread Yury Selivanov
Changes by Yury Selivanov : Removed file: http://bugs.python.org/file39443/gen_stop_warn.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-20 Thread Yury Selivanov
Changes by Yury Selivanov : Removed file: http://bugs.python.org/file39442/gen_stop_warn.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-20 Thread Yury Selivanov
Changes by Yury Selivanov : Added file: http://bugs.python.org/file39443/gen_stop_warn.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-20 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-20 Thread Yury Selivanov
Yury Selivanov added the comment: Nick, please review the patch. BTW, we will have *a lot* of warnings now when running tests with -Wall. Are we going to employ "from __future__ import generator_stop" everywhere in 3.5? -- keywords: +patch nosy: +yselivanov priority: normal -> release

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-19 Thread Nick Coghlan
Changes by Nick Coghlan : -- dependencies: +PEP 479: Change StopIteration handling inside generators ___ Python tracker ___ ___ Python

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-19 Thread Nick Coghlan
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