PyMOTW: warnings

The warnings module was introduced in PEP 230 as a way to warn programmers about changes in language or library features in anticipation of backwards incompatible changes coming with Python 3.0. Since warnings are not fatal, a program may encounter the same warn-able situation many times in the course of running. The warnings module suppresses repeated warnings from the same source to cut down on the annoyance factor of showing the same message over and over. You can control the messages printed on a case-by-case basis using the -W option to the interpreter or by calling functions inside warnings from your code.

Read more at pymotw.com: warnings