Commit bbb49b24 authored by Julian Andres Klode's avatar Julian Andres Klode

Drop binding for SmartTargetPkg()

SmartTargetPkg() does not do anything useful for any user,
and its documentation was entirely wrong.

There are no users of this method in the archive, on
GitHub, or in Black Duck Open Hub search results; the
impact of this change should thus be zero.

Closes: #791345
parent 51041842
......@@ -1007,12 +1007,6 @@ Example:
A list of all possible target :class:`Version` objects which satisfy
this dependency.
.. method:: smart_target_pkg
Return a :class:`Version` object of a package which satisfies the
dependency and does not conflict with installed packages
(the 'natural target').
.. attribute:: comp_type
The type of comparison (<,<=,=,!=,>=,>,), as string. Note that the
......
......@@ -6,7 +6,7 @@ Removed
-------
* The class :class:`apt_pkg.IndexRecords` has been removed, as it was removed
in APT 1.1
* :attr:`apt_pkg.Dependency.smart_target_pkg` has been removed.
Added
------
......
......@@ -1342,24 +1342,6 @@ static PyObject *DependencyRepr(PyObject *Self)
Dep.CompType());
}
static PyObject *DepSmartTargetPkg(PyObject *Self,PyObject *Args)
{
if (PyArg_ParseTuple(Args,"") == 0)
return 0;
pkgCache::DepIterator &Dep = GetCpp<pkgCache::DepIterator>(Self);
PyObject *Owner = GetOwner<pkgCache::DepIterator>(Self);
pkgCache::PkgIterator P;
if (Dep.SmartTargetPkg(P) == false)
{
Py_INCREF(Py_None);
return Py_None;
}
return CppPyObject_NEW<pkgCache::PkgIterator>(Owner,&PyPackage_Type,P);
}
static PyObject *DepAllTargets(PyObject *Self,PyObject *Args)
{
if (PyArg_ParseTuple(Args,"") == 0)
......@@ -1383,10 +1365,6 @@ static PyObject *DepAllTargets(PyObject *Self,PyObject *Args)
static PyMethodDef DependencyMethods[] =
{
{"smart_target_pkg",DepSmartTargetPkg,METH_VARARGS,
"smart_target_pkg() -> apt_pkg.Package\n\n"
"Return the first package which provides a package with the name\n"
"of the target package."},
{"all_targets",DepAllTargets,METH_VARARGS,
"all_targets() -> list\n\n"
"A list of all possible apt_pkg.Version objects which satisfy this\n"
......@@ -1501,9 +1479,8 @@ static PyGetSetDef DependencyGetSet[] = {
static const char *dependency_doc =
"Represent a dependency from one package version to a package,\n"
"and (optionally) a version relation (e.g. >= 1). Dependency\n"
"objects also provide useful functions like all_targets() or\n"
"smart_target_pkg() for selecting packages to satisfy the\n"
"dependency.";
"objects also provide useful functions like all_targets()\n"
"for selecting packages to satisfy the dependency.";
PyTypeObject PyDependency_Type =
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment