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/cache.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'python/cache.cc') diff --git a/python/cache.cc b/python/cache.cc index 35c8b78f..a8da6696 100644 --- a/python/cache.cc +++ b/python/cache.cc @@ -1371,6 +1371,8 @@ PyTypeObject RDepListType = #ifdef COMPAT_0_7 PyObject *TmpGetCache(PyObject *Self,PyObject *Args) { + PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.GetCache() is deprecated. " + "Please see apt_pkg.Cache() for the replacement.", 1); return PkgCacheNew(&PkgCacheType,Args,0); } #endif -- cgit v1.2.3