summaryrefslogtreecommitdiff
path: root/python/tag.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/tag.cc
parent2d962f13c554681ded71e665a429eb359742531f (diff)
downloadpython-apt-b81133a92aa673d0d9315e9837012e59a988333a.tar.gz
python: Add DeprecationWarning to functions which were replaced by classes.
Diffstat (limited to 'python/tag.cc')
-rw-r--r--python/tag.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/tag.cc b/python/tag.cc
index 7e7eb21c..05423e3d 100644
--- a/python/tag.cc
+++ b/python/tag.cc
@@ -268,6 +268,9 @@ static PyObject *TagSecNew(PyTypeObject *type,PyObject *Args,PyObject *kwds) {
char *doc_ParseSection ="ParseSection(Text) -> TagSection() object. Deprecated.";
PyObject *ParseSection(PyObject *self,PyObject *Args)
{
+ PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.ParseSection() is "
+ "deprecated. Please see apt_pkg.TagSection() for the "
+ "replacement.", 1);
return TagSecNew(&TagSecType,Args,0);
}
#endif
@@ -302,6 +305,9 @@ static PyObject *TagFileNew(PyTypeObject *type,PyObject *Args,PyObject *kwds)
#ifdef COMPAT_0_7
char *doc_ParseTagFile = "ParseTagFile(File) -> TagFile() object. Deprecated.";
PyObject *ParseTagFile(PyObject *self,PyObject *Args) {
+ PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.ParseTagFile() is "
+ "deprecated. Please see apt_pkg.TagFile() for the "
+ "replacement.", 1);
return TagFileNew(&TagFileType,Args,0);
}
#endif