From a169fd15520d61303639c0dfa2aabec3f6446fb6 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sat, 27 Feb 2010 17:31:39 +0100 Subject: * python: - Handle deprecated attributes and methods in the tp_gettattro slot, this allows us to easily warn if a deprecated function is used. --- python/sourcelist.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'python/sourcelist.cc') diff --git a/python/sourcelist.cc b/python/sourcelist.cc index b705d8b8..6184fee3 100644 --- a/python/sourcelist.cc +++ b/python/sourcelist.cc @@ -77,11 +77,6 @@ static PyMethodDef PkgSourceListMethods[] = {"find_index",PkgSourceListFindIndex,METH_VARARGS,doc_PkgSourceListFindIndex}, {"read_main_list",PkgSourceListReadMainList,METH_VARARGS,doc_PkgSourceListReadMainList}, {"get_indexes",PkgSourceListGetIndexes,METH_VARARGS,doc_PkgSourceListGetIndexes}, -#ifdef COMPAT_0_7 - {"FindIndex",PkgSourceListFindIndex,METH_VARARGS,doc_PkgSourceListFindIndex}, - {"ReadMainList",PkgSourceListReadMainList,METH_VARARGS,doc_PkgSourceListReadMainList}, - {"GetIndexes",PkgSourceListGetIndexes,METH_VARARGS,doc_PkgSourceListGetIndexes}, -#endif {} }; @@ -104,9 +99,6 @@ static PyObject *PkgSourceListGetList(PyObject *Self,void*) static PyGetSetDef PkgSourceListGetSet[] = { {"list",PkgSourceListGetList,0,"A list of MetaIndex() objects.",0}, -#ifdef COMPAT_0_7 - {"List",PkgSourceListGetList,0,"A list of MetaIndex() objects.",0}, -#endif {} }; @@ -137,7 +129,7 @@ PyTypeObject PySourceList_Type = 0, // tp_hash 0, // tp_call 0, // tp_str - 0, // tp_getattro + _PyAptObject_getattro, // tp_getattro 0, // tp_setattro 0, // tp_as_buffer (Py_TPFLAGS_DEFAULT | // tp_flags -- cgit v1.2.3