diff options
| author | Julian Andres Klode <jak@debian.org> | 2010-02-27 17:31:39 +0100 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2010-02-27 17:31:39 +0100 |
| commit | a169fd15520d61303639c0dfa2aabec3f6446fb6 (patch) | |
| tree | 7e791c9c63df5bddae36c4734164a24618bc95b0 /python/pkgrecords.cc | |
| parent | 523c71a6c9b722804c65efdb79daafc56248488f (diff) | |
| download | python-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/pkgrecords.cc')
| -rw-r--r-- | python/pkgrecords.cc | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/python/pkgrecords.cc b/python/pkgrecords.cc index 1e43b2e8..0e00edcd 100644 --- a/python/pkgrecords.cc +++ b/python/pkgrecords.cc @@ -50,9 +50,6 @@ static PyObject *PkgRecordsLookup(PyObject *Self,PyObject *Args) static PyMethodDef PkgRecordsMethods[] = { {"lookup",PkgRecordsLookup,METH_VARARGS,"Changes to a new package"}, - #ifdef COMPAT_0_7 - {"Lookup",PkgRecordsLookup,METH_VARARGS,"Changes to a new package"}, - #endif {} }; @@ -132,20 +129,6 @@ static PyGetSetDef PkgRecordsGetSet[] = { {"short_desc",PkgRecordsGetShortDesc}, {"source_pkg",PkgRecordsGetSourcePkg}, {"source_ver",PkgRecordsGetSourceVer}, -#ifdef COMPAT_0_7 - {"FileName",PkgRecordsGetFileName}, - {"Homepage",PkgRecordsGetHomepage}, - {"LongDesc",PkgRecordsGetLongDesc}, - {"MD5Hash",PkgRecordsGetMD5Hash}, - {"Maintainer",PkgRecordsGetMaintainer}, - {"Name",PkgRecordsGetName}, - {"Record",PkgRecordsGetRecord}, - {"SHA1Hash",PkgRecordsGetSHA1Hash}, - {"SHA256Hash",PkgRecordsGetSHA256Hash}, - {"ShortDesc",PkgRecordsGetShortDesc}, - {"SourcePkg",PkgRecordsGetSourcePkg}, - {"SourceVer",PkgRecordsGetSourceVer}, -#endif {} }; @@ -180,7 +163,7 @@ PyTypeObject PyPackageRecords_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 |
