test_logging was blindly clearing the warnings filter. This caused
PendingDeprecationWarnings to be spewed all over by unittest.failIf*(). Fix
moves over to using warnings.catch_warning to protect the warnings filter.
diff --git a/Misc/NEWS b/Misc/NEWS
index 2e01d0d..c447452 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -730,6 +730,8 @@
 Tests
 -----
 
+- Fix test_logging to no longer reset the warnings filter.
+
 - Issue #5635: Fix running test_sys with tracing enabled.
 
 - regrtest no longer treats ImportError as equivalent to SkipTest.  Imports