summaryrefslogtreecommitdiff
path: root/python/pkgmanager.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-06-21 14:05:49 +0200
committerJulian Andres Klode <jak@debian.org>2009-06-21 14:05:49 +0200
commitb81133a92aa673d0d9315e9837012e59a988333a (patch)
tree927146f8511c5a777103a2ff2b4b56ab11c6291f /python/pkgmanager.cc
parent2d962f13c554681ded71e665a429eb359742531f (diff)
downloadpython-apt-b81133a92aa673d0d9315e9837012e59a988333a.tar.gz
python: Add DeprecationWarning to functions which were replaced by classes.
Diffstat (limited to 'python/pkgmanager.cc')
-rw-r--r--python/pkgmanager.cc3
1 files changed, 3 insertions, 0 deletions
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