=== modified file 'python/generic.cc' --- python/generic.cc 2010-03-23 08:09:23 +0000 +++ python/generic.cc 2010-03-28 16:49:24 +0000 @@ -11,7 +11,7 @@ #include "generic.h" using namespace std; - +#include #include /*}}}*/ @@ -101,7 +101,8 @@ PyObject *_PyAptObject_getattro(PyObject strlen(attrname) + 66]; sprintf(warning_string, "Attribute '%s' of the '%s' object is " "deprecated, use '%s' instead.", attrname, cls, newattrname); - PyErr_WarnEx(PyExc_DeprecationWarning, warning_string, 1); + if (getenv("PYTHON_APT_DEPRECATION_WARNINGS") != NULL) + PyErr_WarnEx(PyExc_DeprecationWarning, warning_string, 1); delete[] warning_string; } else { Py_XINCREF(ptype); === modified file 'tests/old/memleak.py' (properties changed: +x to -x)