summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-06-05 16:36:52 +0200
committerJulian Andres Klode <jak@debian.org>2009-06-05 16:36:52 +0200
commitacf0e2af557be18a31570f8e21ccf67233b20004 (patch)
tree87dab01259fedb0c379ed37811977a8489448243
parentf4fc81750d2dd7df9eda9599d2841ea70ff610ad (diff)
downloadpython-apt-acf0e2af557be18a31570f8e21ccf67233b20004.tar.gz
python/: Put all deprecated Get*() functions into #ifdef COMPAT_0_7.
-rw-r--r--python/acquire.cc5
-rw-r--r--python/apt_pkgmodule.cc2
-rw-r--r--python/cache.cc3
-rw-r--r--python/cdrom.cc2
-rw-r--r--python/depcache.cc8
-rw-r--r--python/pkgmanager.cc2
-rw-r--r--python/pkgrecords.cc4
-rw-r--r--python/pkgsrcrecords.cc3
-rw-r--r--python/sourcelist.cc5
-rw-r--r--python/tag.cc4
10 files changed, 29 insertions, 9 deletions
diff --git a/python/acquire.cc b/python/acquire.cc
index 5f38f7bd..e6a23548 100644
--- a/python/acquire.cc
+++ b/python/acquire.cc
@@ -297,11 +297,12 @@ PyTypeObject PkgAcquireType =
PkgAcquireNew, // tp_new
};
-
+#ifdef COMPAT_0_7
PyObject *GetAcquire(PyObject *Self,PyObject *Args)
{
return PkgAcquireNew(&PkgAcquireType,Args,0);
}
+#endif
static PyObject *PkgAcquireFileNew(PyTypeObject *type, PyObject *Args, PyObject * kwds)
{
@@ -386,6 +387,7 @@ PyTypeObject PkgAcquireFileType =
PkgAcquireFileNew, // tp_new
};
+#ifdef COMPAT_0_7
char *doc_GetPkgAcqFile =
"GetPkgAcqFile(pkgAquire, uri[, md5, size, descr, shortDescr, destDir, destFile]) -> PkgAcqFile\n";
PyObject *GetPkgAcqFile(PyObject *Self, PyObject *Args, PyObject * kwds)
@@ -417,3 +419,4 @@ PyObject *GetPkgAcqFile(PyObject *Self, PyObject *Args, PyObject * kwds)
return AcqFileObj;
}
+#endif
diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc
index a34d4720..4ad4e56c 100644
--- a/python/apt_pkgmodule.cc
+++ b/python/apt_pkgmodule.cc
@@ -30,11 +30,13 @@
// newConfiguration - Build a new configuration class /*{{{*/
// ---------------------------------------------------------------------
+#ifdef COMPAT_0_7
static char *doc_newConfiguration = "Construct a configuration instance";
static PyObject *newConfiguration(PyObject *self,PyObject *args)
{
return CppPyObject_NEW<Configuration>(&ConfigurationType);
}
+#endif
/*}}}*/
// Version Wrappers /*{{{*/
diff --git a/python/cache.cc b/python/cache.cc
index d09e22f3..38b715de 100644
--- a/python/cache.cc
+++ b/python/cache.cc
@@ -1345,8 +1345,9 @@ PyTypeObject RDepListType =
/*}}}*/
-
+#ifdef COMPAT_0_7
PyObject *TmpGetCache(PyObject *Self,PyObject *Args)
{
return PkgCacheNew(&PkgCacheType,Args,0);
}
+#endif
diff --git a/python/cdrom.cc b/python/cdrom.cc
index 044bbf30..3e63a89c 100644
--- a/python/cdrom.cc
+++ b/python/cdrom.cc
@@ -129,10 +129,12 @@ PyTypeObject PkgCdromType =
PkgCdromNew, // tp_new
};
+#ifdef COMPAT_0_7
PyObject *GetCdrom(PyObject *Self,PyObject *Args)
{
return PkgCdromNew(&PkgCdromType,Args,0);
}
+#endif
diff --git a/python/depcache.cc b/python/depcache.cc
index f69802f8..a69e0723 100644
--- a/python/depcache.cc
+++ b/python/depcache.cc
@@ -696,12 +696,12 @@ PyTypeObject PkgDepCacheType =
PkgDepCacheNew, // tp_new
};
-
+#ifdef COMPAT_0_7
PyObject *GetDepCache(PyObject *Self,PyObject *Args)
{
return PkgDepCacheNew(&PkgDepCacheType,Args,0);
}
-
+#endif
@@ -729,9 +729,11 @@ static PyObject *PkgProblemResolverNew(PyTypeObject *type,PyObject *Args,PyObjec
return PkgProblemResolverPyObj;
}
+#ifdef COMPAT_0_7
PyObject *GetPkgProblemResolver(PyObject *Self,PyObject *Args) {
return PkgProblemResolverNew(&PkgProblemResolverType,Args,0);
}
+#endif
static PyObject *PkgProblemResolverResolve(PyObject *Self,PyObject *Args)
{
@@ -994,10 +996,12 @@ PyTypeObject PkgActionGroupType =
PkgActionGroupNew, // tp_new
};
+#ifdef COMPAT_0_7
PyObject *GetPkgActionGroup(PyObject *Self,PyObject *Args)
{
return PkgActionGroupNew(&PkgActionGroupType,Args,0);
}
+#endif
/*}}}*/
diff --git a/python/pkgmanager.cc b/python/pkgmanager.cc
index cae2b580..7752ce5b 100644
--- a/python/pkgmanager.cc
+++ b/python/pkgmanager.cc
@@ -36,10 +36,12 @@ static PyObject *PkgManagerNew(PyTypeObject *type,PyObject *Args,PyObject *kwds)
return PkgManagerObj;
}
+#ifdef COMPAT_0_7
PyObject *GetPkgManager(PyObject *Self,PyObject *Args)
{
return PkgManagerNew(&PkgManagerType,Args,0);
}
+#endif
static PyObject *PkgManagerGetArchives(PyObject *Self,PyObject *Args)
diff --git a/python/pkgrecords.cc b/python/pkgrecords.cc
index 212e4ab0..6022097a 100644
--- a/python/pkgrecords.cc
+++ b/python/pkgrecords.cc
@@ -210,9 +210,9 @@ PyTypeObject PkgRecordsType =
/*}}}*/
-
+#ifdef COMPAT_0_7
PyObject *GetPkgRecords(PyObject *Self,PyObject *Args)
{
return PkgRecordsNew(&PkgRecordsType,Args,0);
}
-
+#endif
diff --git a/python/pkgsrcrecords.cc b/python/pkgsrcrecords.cc
index dea7ff37..50445432 100644
--- a/python/pkgsrcrecords.cc
+++ b/python/pkgsrcrecords.cc
@@ -251,6 +251,7 @@ PyTypeObject PkgSrcRecordsType =
/*}}}*/
+#ifdef COMPAT_0_7
PyObject *GetPkgSrcRecords(PyObject *Self,PyObject *Args)
{
#if 0
@@ -266,4 +267,4 @@ PyObject *GetPkgSrcRecords(PyObject *Self,PyObject *Args)
return HandleErrors(CppPyObject_NEW<PkgSrcRecordsStruct>(&PkgSrcRecordsType));
}
-
+#endif
diff --git a/python/sourcelist.cc b/python/sourcelist.cc
index daf0c08c..1c05d83e 100644
--- a/python/sourcelist.cc
+++ b/python/sourcelist.cc
@@ -159,8 +159,9 @@ PyTypeObject PkgSourceListType =
PkgSourceListNew, // tp_new
};
+#ifdef COMPAT_0_7
PyObject *GetPkgSourceList(PyObject *Self,PyObject *Args)
{
- return CppPyObject_NEW<pkgSourceList*>(&PkgSourceListType,new pkgSourceList());
+ return PkgSourceListNew(&PkgSourceListType,Args,0);
}
-
+#endif
diff --git a/python/tag.cc b/python/tag.cc
index c30adb0a..5a31488c 100644
--- a/python/tag.cc
+++ b/python/tag.cc
@@ -264,11 +264,13 @@ static PyObject *TagSecNew(PyTypeObject *type,PyObject *Args,PyObject *kwds) {
return New;
}
+#ifdef COMPAT_0_7
char *doc_ParseSection ="ParseSection(Text) -> TagSection() object. Deprecated.";
PyObject *ParseSection(PyObject *self,PyObject *Args)
{
return TagSecNew(&TagSecType,Args,0);
}
+#endif
/*}}}*/
// ParseTagFile - Parse a tagd file /*{{{*/
// ---------------------------------------------------------------------
@@ -297,10 +299,12 @@ static PyObject *TagFileNew(PyTypeObject *type,PyObject *Args,PyObject *kwds)
return HandleErrors(New);
}
+#ifdef COMPAT_0_7
char *doc_ParseTagFile = "ParseTagFile(File) -> TagFile() object. Deprecated.";
PyObject *ParseTagFile(PyObject *self,PyObject *Args) {
return TagFileNew(&TagFileType,Args,0);
}
+#endif
/*}}}*/
// RewriteSection - Rewrite a section.. /*{{{*/
// ---------------------------------------------------------------------