I don't know why Python applications are so verbose with deprecation warnings. Either the apps should be fixed, or the system should be configured to not emit those pesky warnings in production. Since the former is not happening, I found a way to do the latter. So, if you are sick and tired of warnings like this:
/usr/lib/pymodules/python2.6/rdiff_backup/SetConnections.py:148: DeprecationWarning: os.popen2 is deprecated. Use the subprocess module.
stdin, stdout = os.popen2(remote_cmd)
/etc/python2.6/sitecustomize.py file and append these two lines at the very end of the file:
Of course, look for
sitecustomize.py elsewhere if it's not in the same directory as on my system (check
/usr/lib/pythonX.Y/site-packages directories). The correct location obviously depends on the Python version.