diff -r 98399c347108 Lib/warnings.py --- a/Lib/warnings.py Thu Apr 29 22:34:25 2010 +0200 +++ b/Lib/warnings.py Thu Apr 29 22:38:52 2010 -0400 @@ -216,9 +216,6 @@ text = message message = category(message) key = (text, category, lineno) - # Quick test for common case - if registry.get(key): - return # Search the filters for item in filters: action, msg, cat, mod, ln = item @@ -229,6 +226,14 @@ break else: action = defaultaction + + if action == "always": + registry.pop(key, None) + + # Quick test for common case + if registry.get(key): + return + # Early exit actions if action == "ignore": registry[key] = 1