Set __warningregistry__ to None.
>>> import warnings
>>> __warningregistry__ = None
>>> for i in range(3):
... warnings.warn("oh noes!")
Warning (from warnings module):
File "<pyshell#3>", line 2
UserWarning: oh noes!
Warning (from warnings module):
File "<pyshell#3>", line 2
UserWarning: oh noes!
Warning (from warnings module):
File "<pyshell#3>", line 2
UserWarning: oh noes!