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/pkgmanager.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'python/pkgmanager.cc') diff --git a/python/pkgmanager.cc b/python/pkgmanager.cc index 0fd2cd92..668f7cfc 100644 --- a/python/pkgmanager.cc +++ b/python/pkgmanager.cc @@ -39,6 +39,9 @@ static PyObject *PkgManagerNew(PyTypeObject *type,PyObject *Args,PyObject *kwds) #ifdef COMPAT_0_7 PyObject *GetPkgManager(PyObject *Self,PyObject *Args) { + PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.GetPackageManager() is " + "deprecated. Please see apt_pkg.PackageManager() for the " + "replacement.", 1); return PkgManagerNew(&PkgManagerType,Args,0); } #endif -- cgit v1.2.3