cpython: 150d36dbe3ba (original) (raw)
Mercurial > cpython
changeset 105476:150d36dbe3ba 3.6
warnings: Fix the issue number The fix for catch_warnings() is the issue #28835 (not the issue #28089). [#28835]
Victor Stinner victor.stinner@gmail.com | |
---|---|
date | Tue, 06 Dec 2016 11:02:12 +0100 |
parents | 726308cfe3b5 |
children | 9db231dd0b73 a4d4dd411431 |
files | Lib/test/test_warnings/__init__.py Misc/NEWS |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-)[+] [-] Lib/test/test_warnings/__init__.py 4 Misc/NEWS 2 |
line wrap: on
line diff
--- a/Lib/test/test_warnings/init.py +++ b/Lib/test/test_warnings/init.py @@ -945,7 +945,7 @@ class CatchWarningTests(BaseTest): self.assertTrue(wmod.filters is orig_filters) def test_record_override_showwarning_before(self):
# Issue #28089: If warnings.showwarning() was overriden, make sure[](#l1.7)
# Issue #28835: If warnings.showwarning() was overriden, make sure[](#l1.8) # that catch_warnings(record=True) overrides it again.[](#l1.9) text = "This is a warning"[](#l1.10) wmod = self.module[](#l1.11)
@@ -970,7 +970,7 @@ class CatchWarningTests(BaseTest): self.assertEqual(my_log, []) def test_record_override_showwarning_inside(self):
# Issue #28089: It is possible to override warnings.showwarning()[](#l1.16)
# Issue #28835: It is possible to override warnings.showwarning()[](#l1.17) # in the catch_warnings(record=True) context manager.[](#l1.18) text = "This is a warning"[](#l1.19) wmod = self.module[](#l1.20)
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -26,7 +26,7 @@ Core and Builtins Library ------- -- Issue #28089: Fix a regression introduced in warnings.catch_warnings(): +- Issue #28835: Fix a regression introduced in warnings.catch_warnings(): call warnings.showwarning() if it was overriden inside the context manager.