From 645c80f504f98332fb8eceb955c13a54e38e5956 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 8 Mar 2009 18:23:12 +0100 Subject: * doc/source/*: Improve the documentation - Document more attributes and functions of apt_pkg (they are all listed) --- doc/source/apt/package.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'doc/source/apt') diff --git a/doc/source/apt/package.rst b/doc/source/apt/package.rst index 6781717c..bb74915e 100644 --- a/doc/source/apt/package.rst +++ b/doc/source/apt/package.rst @@ -10,6 +10,11 @@ The Package class .. autoclass:: Package :members: + .. note:: + + Several methods have been deprecated in version 0.7.9 of python-apt, + please see the :class:`Version` class for the new alternatives. + The Version class ----------------- .. autoclass:: Version @@ -93,14 +98,14 @@ Examples cache = apt.Cache() pkg = cache['python-apt'] # Access the Package object for python-apt - print 'python-apt is trusted:', pkg.candidateOrigin.trusted + print 'python-apt is trusted:', pkg.candidate.origins[0].trusted # Mark python-apt for install pkg.markInstall() print 'python-apt is marked for install:', pkg.markedInstall - print 'python-apt is', pkg.summary #Python interface to libapt-pkg + print 'python-apt is (summary):', pkg.candidate.summary # Now, really install it cache.commit() -- cgit v1.2.3