From b81133a92aa673d0d9315e9837012e59a988333a Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 21 Jun 2009 14:05:49 +0200 Subject: python: Add DeprecationWarning to functions which were replaced by classes. --- python/sourcelist.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'python/sourcelist.cc') diff --git a/python/sourcelist.cc b/python/sourcelist.cc index e53fccd3..2cf5eea9 100644 --- a/python/sourcelist.cc +++ b/python/sourcelist.cc @@ -163,6 +163,9 @@ PyTypeObject PkgSourceListType = #ifdef COMPAT_0_7 PyObject *GetPkgSourceList(PyObject *Self,PyObject *Args) { + PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.GetPkgSourceList() is " + "deprecated. Please see apt_pkg.SourceList() for the " + "replacement.", 1); return PkgSourceListNew(&PkgSourceListType,Args,0); } #endif -- cgit v1.2.3