Напишите отдельный модуль, подобный этому.
import warnings
# capture all warnings
with warnings.catch_warnings(record=True) as warns:
warnings.simplefilter("always")
# do the stuff that triggers warnings. i.e. import your main module
# and call whatever is necessary to get it going. This must all be
# indented under the with statement!
# afterward, print captured warnings
for w in warns:
print w.category.__name__, "(%s)" % w.message,
print "in", w.filename, "at line", w.lineno