From 015acac98dc88fbbca5672c6be678c8dea491a8e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 1 Jun 2010 17:14:30 +0200 Subject: revert commit 346 (this re-enable the deprecation warnings) --- python/depcache.cc | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'python/depcache.cc') diff --git a/python/depcache.cc b/python/depcache.cc index e7d7d946..cd098f2f 100644 --- a/python/depcache.cc +++ b/python/depcache.cc @@ -766,9 +766,8 @@ PyTypeObject PyDepCache_Type = #ifdef COMPAT_0_7 PyObject *GetDepCache(PyObject *Self,PyObject *Args) { - if (getenv("PYTHON_APT_DEPRECATION_WARNINGS") != NULL) - PyErr_WarnEx(PyExc_DeprecationWarning,"apt_pkg.GetDepCache() is deprecated" - ". Please see apt_pkg.DepCache() for the replacement.",1); + PyErr_WarnEx(PyExc_DeprecationWarning,"apt_pkg.GetDepCache() is deprecated" + ". Please see apt_pkg.DepCache() for the replacement.",1); return PkgDepCacheNew(&PyDepCache_Type,Args,0); } #endif @@ -801,10 +800,9 @@ static PyObject *PkgProblemResolverNew(PyTypeObject *type,PyObject *Args,PyObjec #ifdef COMPAT_0_7 PyObject *GetPkgProblemResolver(PyObject *Self,PyObject *Args) { - if (getenv("PYTHON_APT_DEPRECATION_WARNINGS") != NULL) - PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.GetPkgProblemResolver() is" - " deprecated. Please see apt_pkg.ProblemResolver() for the " - "replacement.", 1); + PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.GetPkgProblemResolver() is" + " deprecated. Please see apt_pkg.ProblemResolver() for the " + "replacement.", 1); return PkgProblemResolverNew(&PyProblemResolver_Type,Args,0); } #endif @@ -1093,10 +1091,9 @@ PyTypeObject PyActionGroup_Type = #ifdef COMPAT_0_7 PyObject *GetPkgActionGroup(PyObject *Self,PyObject *Args) { - if (getenv("PYTHON_APT_DEPRECATION_WARNINGS") != NULL) - PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.GetPkgActionGroup() is " - "deprecated. Please see apt_pkg.ActionGroup() for the " - "replacement.", 1); + PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.GetPkgActionGroup() is " + "deprecated. Please see apt_pkg.ActionGroup() for the " + "replacement.", 1); return PkgActionGroupNew(&PyActionGroup_Type,Args,0); } #endif -- cgit v1.2.3