summaryrefslogtreecommitdiff
path: root/python/depcache.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/depcache.cc
parent2d962f13c554681ded71e665a429eb359742531f (diff)
downloadpython-apt-b81133a92aa673d0d9315e9837012e59a988333a.tar.gz
python: Add DeprecationWarning to functions which were replaced by classes.
Diffstat (limited to 'python/depcache.cc')
-rw-r--r--python/depcache.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/depcache.cc b/python/depcache.cc
index 288eb0b0..7cf8e0a2 100644
--- a/python/depcache.cc
+++ b/python/depcache.cc
@@ -701,6 +701,8 @@ PyTypeObject PkgDepCacheType =
#ifdef COMPAT_0_7
PyObject *GetDepCache(PyObject *Self,PyObject *Args)
{
+ PyErr_WarnEx(PyExc_DeprecationWarning,"apt_pkg.GetDepCache() is deprecated"
+ ". Please see apt_pkg.DepCache() for the replacement.",1);
return PkgDepCacheNew(&PkgDepCacheType,Args,0);
}
#endif
@@ -733,6 +735,9 @@ static PyObject *PkgProblemResolverNew(PyTypeObject *type,PyObject *Args,PyObjec
#ifdef COMPAT_0_7
PyObject *GetPkgProblemResolver(PyObject *Self,PyObject *Args) {
+ PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.GetPkgProblemResolver() is"
+ " deprecated. Please see apt_pkg.ProblemResolver() for the "
+ "replacement.", 1);
return PkgProblemResolverNew(&PkgProblemResolverType,Args,0);
}
#endif
@@ -1003,6 +1008,9 @@ PyTypeObject PkgActionGroupType =
#ifdef COMPAT_0_7
PyObject *GetPkgActionGroup(PyObject *Self,PyObject *Args)
{
+ PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.GetPkgActionGroup() is "
+ "deprecated. Please see apt_pkg.ActionGroup() for the "
+ "replacement.", 1);
return PkgActionGroupNew(&PkgActionGroupType,Args,0);
}
#endif