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/tag.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'python/tag.cc') diff --git a/python/tag.cc b/python/tag.cc index 5db34c1d..9fe12a1a 100644 --- a/python/tag.cc +++ b/python/tag.cc @@ -371,10 +371,9 @@ static PyObject *TagSecNew(PyTypeObject *type,PyObject *Args,PyObject *kwds) { char *doc_ParseSection = "ParseSection(Text) -> TagSection()\n\nDeprecated."; PyObject *ParseSection(PyObject *self,PyObject *Args) { - if (getenv("PYTHON_APT_DEPRECATION_WARNINGS") != NULL) - PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.ParseSection() is " - "deprecated. Please see apt_pkg.TagSection() for the " - "replacement.", 1); + PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.ParseSection() is " + "deprecated. Please see apt_pkg.TagSection() for the " + "replacement.", 1); return TagSecNew(&PyTagSection_Type,Args,0); } #endif @@ -411,10 +410,9 @@ static PyObject *TagFileNew(PyTypeObject *type,PyObject *Args,PyObject *kwds) #ifdef COMPAT_0_7 char *doc_ParseTagFile = "ParseTagFile(file) -> TagFile()\n\nDeprecated."; PyObject *ParseTagFile(PyObject *self,PyObject *Args) { - if (getenv("PYTHON_APT_DEPRECATION_WARNINGS") != NULL) - PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.ParseTagFile() is " - "deprecated. Please see apt_pkg.TagFile() for the " - "replacement.", 1); + PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.ParseTagFile() is " + "deprecated. Please see apt_pkg.TagFile() for the " + "replacement.", 1); return TagFileNew(&PyTagFile_Type,Args,0); } #endif -- cgit v1.2.3