summaryrefslogtreecommitdiff
path: root/python/acquire.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2010-02-27 17:31:39 +0100
committerJulian Andres Klode <jak@debian.org>2010-02-27 17:31:39 +0100
commita169fd15520d61303639c0dfa2aabec3f6446fb6 (patch)
tree7e791c9c63df5bddae36c4734164a24618bc95b0 /python/acquire.cc
parent523c71a6c9b722804c65efdb79daafc56248488f (diff)
downloadpython-apt-a169fd15520d61303639c0dfa2aabec3f6446fb6.tar.gz
* python:
- Handle deprecated attributes and methods in the tp_gettattro slot, this allows us to easily warn if a deprecated function is used.
Diffstat (limited to 'python/acquire.cc')
-rw-r--r--python/acquire.cc12
1 files changed, 1 insertions, 11 deletions
diff --git a/python/acquire.cc b/python/acquire.cc
index 5e22280e..cc9ee310 100644
--- a/python/acquire.cc
+++ b/python/acquire.cc
@@ -229,10 +229,6 @@ static PyObject *PkgAcquireShutdown(PyObject *Self,PyObject *Args)
static PyMethodDef PkgAcquireMethods[] = {
{"run",PkgAcquireRun,METH_VARARGS,"Run the fetcher"},
{"shutdown",PkgAcquireShutdown, METH_VARARGS,"Shutdown the fetcher"},
-#ifdef COMPAT_0_7
- {"Run",PkgAcquireRun,METH_VARARGS,"Run the fetcher"},
- {"Shutdown",PkgAcquireShutdown, METH_VARARGS,"Shutdown the fetcher"},
-#endif
{}
};
@@ -284,12 +280,6 @@ static PyGetSetDef PkgAcquireGetSet[] = {
{"workers",PkgAcquireGetWorkers},
{"partial_present",PkgAcquireGetPartialPresent},
{"total_needed",PkgAcquireGetTotalNeeded},
-#ifdef COMPAT_0_7
- {"FetchNeeded",PkgAcquireGetFetchNeeded},
- {"Items",PkgAcquireGetItems},
- {"PartialPresent",PkgAcquireGetPartialPresent},
- {"TotalNeeded",PkgAcquireGetTotalNeeded},
-#endif
{}
};
@@ -354,7 +344,7 @@ PyTypeObject PyAcquire_Type = {
0, // tp_hash
0, // tp_call
0, // tp_str
- 0, // tp_getattro
+ _PyAptObject_getattro, // tp_getattro
0, // tp_setattro
0, // tp_as_buffer
(Py_TPFLAGS_DEFAULT | // tp_flags