diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-06-21 14:05:49 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-06-21 14:05:49 +0200 |
| commit | b81133a92aa673d0d9315e9837012e59a988333a (patch) | |
| tree | 927146f8511c5a777103a2ff2b4b56ab11c6291f /python/acquire.cc | |
| parent | 2d962f13c554681ded71e665a429eb359742531f (diff) | |
| download | python-apt-b81133a92aa673d0d9315e9837012e59a988333a.tar.gz | |
python: Add DeprecationWarning to functions which were replaced by classes.
Diffstat (limited to 'python/acquire.cc')
| -rw-r--r-- | python/acquire.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/python/acquire.cc b/python/acquire.cc index 6b091479..d0549fd9 100644 --- a/python/acquire.cc +++ b/python/acquire.cc @@ -301,6 +301,8 @@ PyTypeObject PkgAcquireType = #ifdef COMPAT_0_7 PyObject *GetAcquire(PyObject *Self,PyObject *Args) { + PyErr_WarnEx(PyExc_DeprecationWarning,"apt_pkg.GetAcquire() is deprecated." + " Please see apt_pkg.Acquire() for the replacement.", 1); return PkgAcquireNew(&PkgAcquireType,Args,0); } #endif @@ -394,6 +396,9 @@ char *doc_GetPkgAcqFile = "GetPkgAcqFile(pkgAquire, uri[, md5, size, descr, shortDescr, destDir, destFile]) -> PkgAcqFile\n"; PyObject *GetPkgAcqFile(PyObject *Self, PyObject *Args, PyObject * kwds) { + PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.GetPkgAcqFile() is " + "deprecated. Please see apt_pkg.AcquireFile() for the " + "replacement", 1); PyObject *pyfetcher; char *uri, *md5, *descr, *shortDescr, *destDir, *destFile; int size = 0; |
