[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +909 ___ Python tracker ___ ___

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-08 Thread Nick Coghlan
Nick Coghlan added the comment: If the intended reference was to #28897, then yes, it was related: NumPy had introduced a workaround for the regression that existed in the beta releases (presumably thinking it was an intentional change that just hadn't been added to the porting guide yet),

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-08 Thread Martin Panter
Martin Panter added the comment: Brett, what was the other bug? The bug number you posted is for this bug. -- ___ Python tracker ___

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-08 Thread Brett Cannon
Brett Cannon added the comment: I just happened to look at that bug before seeing this bug and both mentioned recording issues so I thought I would mention there was a chance of a connection. -- ___ Python tracker

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-07 Thread Ned Deily
Ned Deily added the comment: Brett, msg282646 ? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-07 Thread Brett Cannon
Brett Cannon added the comment: There's also issue #28835 which might be related. -- ___ Python tracker ___

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-06 Thread Ned Deily
Ned Deily added the comment: Thanks everyone for getting this resolved for 360rc1! -- priority: release blocker -> resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset aaee06743c61 by Ned Deily in branch '3.6': Issue #28835: Tidy previous showwarning changes based on review comments. https://hg.python.org/cpython/rev/aaee06743c61 New changeset 7bca3bf6401a by Ned Deily in branch 'default': Issue #28835: merge

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-06 Thread Brett Cannon
Brett Cannon added the comment: Serhiy's patch LGTM. -- nosy: +brett.cannon ___ Python tracker ___ ___

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that cleans up the code. -- Added file: http://bugs.python.org/file45775/showwarning-tidy.patch ___ Python tracker

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-06 Thread STINNER Victor
STINNER Victor added the comment: Julien reviewed the pushed change and asked me questions on IRC: * "nonlocal log": this change is unrelated to the fix, I should have done that in a separated change, sorry, I cannot resist to refactoring :-) The change has no effect, it's more cosmetic to

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-06 Thread STINNER Victor
STINNER Victor added the comment: I pushed a more complete version of my patch: New changeset 726308cfe3b5 by Victor Stinner in branch '3.6': catch_warnings() calls showwarning() if overriden https://hg.python.org/cpython/rev/726308cfe3b5 I dislike pushing a different change than the reviewed

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 150d36dbe3ba by Victor Stinner in branch '3.6': warnings: Fix the issue number https://hg.python.org/cpython/rev/150d36dbe3ba -- nosy: +python-dev ___ Python tracker

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't understand why test_showwarnmsg_missing was added. Why deleting warnings._showwarnmsg should be supported? I would rename _showwarning to _showwarning_orig for accenting it's purpose. It is used only for checking if showwarning was replaced by the

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-05 Thread Martin Panter
Martin Panter added the comment: Actually, I found a regression. Looks like you also need to cancel any showwarning() function set by the user: >>> import warnings >>> warnings.showwarning = print >>> with warnings.catch_warnings(record=True) as recording: ... warnings.warn("hi") #

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-05 Thread Martin Panter
Martin Panter added the comment: The patch looks sensible to me. The fix is basically an extension to the first fixup (9c92352324e8), where Victor split _showwarnmsg_impl() out of _showwarnmsg(). Now, _showwarnmsg() is a helper for the C module to choose between the backwards-compatible

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-05 Thread Nick Coghlan
Nick Coghlan added the comment: +1 from me as well -- assignee: -> haypo nosy: +ncoghlan stage: -> commit review type: -> behavior ___ Python tracker

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-05 Thread STINNER Victor
STINNER Victor added the comment: Patch version 3: fix test_warnings when running the test with python3 -Werror. Reset filters in the new unit test. -- Added file: http://bugs.python.org/file45769/warnings_fix-3.patch ___ Python tracker

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-05 Thread Julien Palard
Julien Palard added the comment: Carefully reviewed, and tests are passing, issue is fixed: LGTM. -- nosy: +mdk ___ Python tracker ___

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-05 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: Would you mind to review warnings_fix-2.patch? I tagged this bug as a release blocker, since it's a regression introduced in 3.6. -- nosy: +serhiy.storchaka ___ Python tracker

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-05 Thread STINNER Victor
STINNER Victor added the comment: Oops, I made a mistake just before producing the patch: here is the right patch, test_warnings pass. -- Added file: http://bugs.python.org/file45768/warnings_fix-2.patch ___ Python tracker

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-05 Thread STINNER Victor
STINNER Victor added the comment: Ok, here is a fix. -- keywords: +patch Added file: http://bugs.python.org/file45767/warnings_fix.patch ___ Python tracker

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-05 Thread Ned Deily
Ned Deily added the comment: What's the status of this issue? It's currently blocking 360rc1. We either need a resolution now or defer it to 3.6.1. -- ___ Python tracker

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: It seems like a regression of Python 3.6, probably introduced by myself with add addition of warnings._showwarningmsg() and the source parameter. -- nosy: +haypo, ned.deily priority: normal -> release blocker ___

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-11-29 Thread Thomas Robitaille
New submission from Thomas Robitaille: In Python 3.5, the following code: import warnings def deal_with_warning(*args, **kwargs): print("warning emitted") with warnings.catch_warnings(record=True): warnings.showwarning = deal_with_warning