[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#597054: marked as done (python-apt: improvements to the documentation)



Your message dated Fri, 27 May 2011 14:51:48 +0000
with message-id <E1QPyOC-0002FL-EL@franck.debian.org>
and subject line Bug#597054: fixed in python-apt 0.8.0
has caused the Debian Bug report #597054,
regarding python-apt: improvements to the documentation
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
597054: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597054
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: python-apt
Version: 0.7.97.1
Severity: normal

Please find attached.


-- 
blog: http://tshepang.tumblr.com
=== modified file 'apt/cache.py'
--- apt/cache.py	2010-09-03 10:08:20 +0000
+++ apt/cache.py	2010-09-15 22:09:43 +0000
@@ -46,15 +46,15 @@
 class Cache(object):
     """Dictionary-like package cache.
 
-    This class has all the packages that are available in it's
-    dictionary.
+    This class has all available packages in its dictionary.
 
     Keyword arguments:
-    progress -- a OpProgress object
-    rootdir -- a alternative root directory. if that is given
-               the system sources.list and system lists/ files are
-               not read, only files relative to the given rootdir
-    memonly -- build the cache in memory only
+
+    * progress -- an OpProgress object
+    * rootdir -- an alternative root directory; the system sources.list
+      and lists/files are skipped in favour of files relative to the
+      rootdir if given
+    * memonly -- build the cache in memory
     """
 
     def __init__(self, progress=None, rootdir=None, memonly=False):
@@ -115,7 +115,7 @@
                 callback()
 
     def open(self, progress=None):
-        """ Open the package cache, after that it can be used like
+        """ Open the package cache, after which it can be used like
             a dictionary
         """
         if progress is None:
@@ -173,8 +173,9 @@
             yield self[pkgname]
         raise StopIteration
 
-    def has_key(self, key):
-        return (key in self._set)
+    def has_key(self, pkgname):
+        "Return ``True`` if pkg `pkgname` is found in the cache."
+        return (pkgname in self._set)
 
     def __contains__(self, key):
         return (key in self._set)
@@ -183,10 +184,11 @@
         return len(self._set)
 
     def keys(self):
+        "Return a list of all package names in the cache."
         return list(self._set)
 
     def get_changes(self):
-        """ Get the marked changes """
+        "Get the marked changes."
         changes = []
         marked_keep = self._depcache.marked_keep
         for pkg in self._cache.packages:
@@ -202,9 +204,9 @@
     def upgrade(self, dist_upgrade=False):
         """Upgrade all packages.
 
-        If the parameter *dist_upgrade* is True, new dependencies will be
+        If the parameter *dist_upgrade* is ``True``, new dependencies will be
         installed as well (and conflicting packages may be removed). The
-        default value is False.
+        default value is ``False``.
         """
         self.cache_pre_change()
         self._depcache.upgrade(dist_upgrade)
@@ -220,7 +222,7 @@
 
     @property
     def required_space(self):
-        """Get the size of the additional required space on the fs."""
+        """Get the size of the additional required space on the filessystem."""
         return self._depcache.usr_size
 
     @property
@@ -281,7 +283,7 @@
             os.close(lock)
 
     def is_virtual_package(self, pkgname):
-        """Return whether the package is a virtual package."""
+        """Return ``True`` in case of a virtual package."""
         try:
             pkg = self._cache[pkgname]
         except KeyError:
@@ -296,12 +298,12 @@
         Return a list of packages which provide the virtual package of the
         specified name. 
 
-        If 'candidate_only' is False, return all packages with at
+        If `candidate_only` is ``False``, return all packages with at
         least one version providing the virtual package. Otherwise,
         return only those packages where the candidate version
         provides the virtual package.
 
-        If 'include_nonvirtual' is True then it will search for all
+        If `include_nonvirtual` is ``True`` then it will search for all
         packages providing pkgname, even if pkgname is not itself
         a virtual pkg.
         """
@@ -328,13 +330,14 @@
     @deprecated_args
     def update(self, fetch_progress=None, pulse_interval=0,
                raise_on_error=True, sources_list=None):
-        """Run the equivalent of apt-get update.
-
-        The first parameter *fetch_progress* may be set to an instance of
-        apt.progress.FetchProgress, the default is apt.progress.FetchProgress()
-        .
+        """Run the equivalent of ``apt-get update``.
+
+        The first parameter, *fetch_progress*, may be set to an instance of
+        :class:`apt.progress.FetchProgress` (default is
+        :class:`apt.progress.base.AcquireProgress()`)
+
         sources_list -- Update a alternative sources.list than the default.
-         Note that the sources.list.d directory is ignored in this case
+        Note that the sources.list.d directory is ignored in this case
         """
         lockfile = apt_pkg.config.find_dir("Dir::State::Lists") + "lock"
         lock = apt_pkg.get_lock(lockfile)
@@ -439,18 +442,18 @@
         return (res == pm.RESULT_COMPLETED)
 
     def clear(self):
-        """ Unmark all changes """
+        "Unmark all changes."
         self._depcache.init()
 
     # cache changes
 
     def cache_post_change(self):
-        " called internally if the cache has changed, emit a signal then "
+        "Called internally if the cache has changed, emit a signal then."
         self._run_callbacks("cache_post_change")
 
     def cache_pre_change(self):
-        """ called internally if the cache is about to change, emit
-            a signal then """
+        """Called internally if the cache is about to change, emit
+           a signal then."""
         self._run_callbacks("cache_pre_change")
 
     def connect(self, name, callback):
@@ -461,20 +464,20 @@
         self._callbacks[name].append(callback)
 
     def actiongroup(self):
-        """Return an ActionGroup() object for the current cache.
+        """Return an :class:`ActionGroup()` object for the current cache.
 
-        Action groups can be used to speedup actions. The action group is
+        Action groups can be used to speed-up actions. The action group is
         active as soon as it is created, and disabled when the object is
         deleted or when release() is called.
 
-        You can use the action group as a context manager, this is the
+        You can use the action group as a context manager. This is the
         recommended way::
 
             with cache.actiongroup():
                 for package in my_selected_packages:
                     package.mark_install()
 
-        This way, the ActionGroup is automatically released as soon as the
+        This way, the action group is automatically released as soon as the
         with statement block is left. It also has the benefit of making it
         clear which parts of the code run with a action group and which
         don't.
@@ -483,11 +486,11 @@
 
     @property
     def dpkg_journal_dirty(self):
-        """Return True if the dpkg was interrupted
+        """Return ``True`` if the dpkg was interrupted.
         
         All dpkg operations will fail until this is fixed, the action to
         fix the system if dpkg got interrupted is to run 
-        'dpkg --configure -a' as root.
+        ``dpkg --configure -a`` as root.
         """
         dpkg_status_dir = os.path.dirname(
             apt_pkg.config.find_file("Dir::State::status"))
@@ -624,7 +627,7 @@
         return (key in self._filtered)
 
     def _reapply_filter(self):
-        " internal helper to refilter "
+        "Internal helper to refilter."
         self._filtered = {}
         for pkg in self.cache:
             for f in self._filters:

=== modified file 'apt/cdrom.py'
--- apt/cdrom.py	2009-07-31 13:24:09 +0000
+++ apt/cdrom.py	2010-09-15 22:18:00 +0000
@@ -28,20 +28,16 @@
 
 
 class Cdrom(apt_pkg.Cdrom):
-    """Support for apt-cdrom like features.
-
-    This class has several optional parameters for initialisation, which may
-    be used to influence the behaviour of the object:
-
-    The optional parameter `progress` is a CdromProgress() subclass, which will
-    ask for the correct cdrom, etc. If not specified or None, a CdromProgress()
-    object will be used.
-
-    The optional parameter `mountpoint` may be used to specify an alternative
-    mountpoint.
-
-    If the optional parameter `nomount` is True, the cdroms will not be
-    mounted. This is the default behaviour.
+    """Support for ``apt-cdrom``-like features.
+
+    All parameters for this class are optional:
+
+    * `progress` is a CdromProgress() subclass, which will ask for the
+      correct cdrom, etc. If not specified or None, a :class:`CdromProgress()`
+      object will be used.
+    * `mountpoint` may be used to specify an alternative mount point.
+    * If the `nomount` is True, the cdroms will not be mounted. This is
+      the default behaviour.
     """
 
     def __init__(self, progress=None, mountpoint=None, nomount=True):

=== modified file 'apt/debfile.py'
--- apt/debfile.py	2010-09-07 12:02:50 +0000
+++ apt/debfile.py	2010-09-15 22:27:23 +0000
@@ -16,7 +16,7 @@
 #  along with this program; if not, write to the Free Software
 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 #  USA
-"""Classes for working with locally available Debian packages."""
+"""Classes for working with locally-available Debian package files."""
 import apt
 import apt_inst
 import apt_pkg
@@ -31,7 +31,7 @@
     """Exception which is raised if a file is no Debian archive."""
 
 class DebPackage(object):
-    """A Debian Package (.deb file)."""
+    """An object representing a Debian Package file (.deb)."""
 
     # Constants for comparing the local package file with the version
     # in the cache
@@ -57,7 +57,7 @@
             self.open(filename)
 
     def open(self, filename):
-        """ open given debfile """
+        """Open a given debfile."""
         self._dbg(3, "open '%s'" % filename)
         self._need_pkgs = []
         self._installed_conflicts = set()
@@ -74,7 +74,7 @@
 
     @property
     def filelist(self):
-        """return the list of files in the deb."""
+        """Return the list of files in the deb."""
         files = []
         try:
             self._debfile.data.go(lambda item, data: files.append(item.name))
@@ -84,7 +84,7 @@
         return files
 
     def _is_or_group_satisfied(self, or_group):
-        """Return True if at least one dependency of the or-group is satisfied.
+        """Return ``True`` if at least one dependency of the or-group is satisfied.
 
         This method gets an 'or_group' and analyzes if at least one dependency
         of this group is already satisfied.
@@ -168,7 +168,7 @@
         return False
 
     def _check_single_pkg_conflict(self, pkgname, ver, oper):
-        """Return True if a pkg conflicts with a real installed/marked pkg."""
+        """Return ``True`` if a pkg conflicts with a real installed/marked pkg."""
         # FIXME: deal with conflicts against its own provides
         #        (e.g. Provides: ftp-server, Conflicts: ftp-server)
         self._dbg(3, "_check_single_pkg_conflict() pkg='%s' ver='%s' oper='%s'" % (pkgname, ver, oper))
@@ -262,9 +262,9 @@
             return []
 
     def replaces_real_pkg(self, pkgname, oper, ver):
-        """Return True if a given non-virtual package is replaced.
+        """Return ``True`` if a given non-virtual package is replaced.
 
-        Return True if the deb packages replaces a real (not virtual)
+        Return ``True`` if the deb packages replaces a real (not virtual)
         packages named (pkgname, oper, ver).
         """
         self._dbg(3, "replaces_real_pkg() %s %s %s" % (pkgname, oper, ver))
@@ -287,7 +287,7 @@
         """Check if there are conflicts with existing or selected packages.
 
         Check if the package conflicts with a existing or to be installed
-        package. Return True if the pkg is OK.
+        package. Return ``True`` if the pkg is OK.
         """
         res = True
         for or_group in self.conflicts:
@@ -299,10 +299,10 @@
 
     def check_breaks_existing_packages(self):
         """ 
-        check if installing the package would break exsisting 
-        package on the system, e.g. system has:
+        Check if installing the package would break exsisting 
+        package(s) on the system, e.g. system has:
         smc depends on smc-data (= 1.4)
-        and user tries to installs smc-data 1.6
+        and user tries to installs smc-data 1.6.
         """
         # show progress information as this step may take some time
         size = float(len(self._cache))
@@ -480,7 +480,7 @@
     def required_changes(self):
         """Get the changes required to satisfy the dependencies.
 
-        Returns: a tuple with (install, remove, unauthenticated)
+        Returns: a tuple with (install, remove, unauthenticated).
         """
         install = []
         remove = []
@@ -501,7 +501,7 @@
 
     @property
     def control_filelist(self):
-        """ return the list of files in control.tar.gt """
+        """Return a list of files in control.tar.gz."""
         try:
             from debian.debfile import DebFile
         except:
@@ -549,7 +549,7 @@
         return data
 
     def control_content(self, name):
-        """ return the content of a specific control.tar.gz file """
+        """Return the content of a specific control.tar.gz file."""
         try:
             from debian.debfile import DebFile
         except:
@@ -560,7 +560,7 @@
         return ""
 
     def data_content(self, name):
-        """ return the content of a specific control.tar.gz file """
+        """Return the content of a specific control.tar.gz file."""
         try:
             from debian.debfile import DebFile
         except:
@@ -647,7 +647,7 @@
         self._sections["Description"] = s
 
     def check(self):
-        """Check if the package is installable.."""
+        """Check if the package is installable."""
         if not self.check_conflicts():
             for pkgname in self._installed_conflicts:
                 if self._cache[pkgname]._pkg.essential:

=== modified file 'apt/package.py'
--- apt/package.py	2010-08-27 13:06:54 +0000
+++ apt/package.py	2010-09-15 20:48:55 +0000
@@ -208,6 +208,16 @@
 
 class Version(object):
     """Representation of a package version.
+    
+    One way to create an instance::
+
+        cache = apt.Cache()
+        pkg = cache["python-apt"]
+        pkgv = pkg.candidate
+
+    And another not-so-readable way::
+
+        pkgv = apt.Cache()["python-apt"].candidate
 
     .. versionadded:: 0.7.9
     """
@@ -300,7 +310,7 @@
 
     @property
     def downloadable(self):
-        """Return whether the version of the package is downloadable."""
+        """Return ``True`` if the version of the package is downloadable."""
         return bool(self._cand.downloadable)
 
     @property
@@ -327,7 +337,7 @@
     def description(self):
         """Return the formatted long description.
 
-        Return the formated long description according to the Debian policy
+        Return the formatted long description according to the Debian policy
         (Chapter 5.6.13).
         See http://www.debian.org/doc/debian-policy/ch-controlfields.html
         for more information.
@@ -724,7 +734,7 @@
 
     @property
     def essential(self):
-        """Return True if the package is an essential part of the system."""
+        """Return ``True`` if the package is an essential part of the system."""
         return self._pkg.essential
 
     @DeprecatedProperty
@@ -836,7 +846,7 @@
     def description(self):
         """Return the formatted long description.
 
-        Return the formated long description according to the Debian policy
+        Return the formatted long description according to the Debian policy
         (Chapter 5.6.13).
         See http://www.debian.org/doc/debian-policy/ch-controlfields.html
         for more information.
@@ -1152,12 +1162,12 @@
 
     @property
     def is_inst_broken(self):
-        """Return True if the to-be-installed package is broken."""
+        """Return ``True`` if the to-be-installed package is broken."""
         return self._pcache._depcache.is_inst_broken(self._pkg)
 
     @property
     def is_now_broken(self):
-        """Return True if the installed package is broken."""
+        """Return ``True`` if the installed package is broken."""
         return self._pcache._depcache.is_now_broken(self._pkg)
 
     # depcache actions

=== modified file 'debian/changelog'
--- debian/changelog	2010-09-07 12:02:50 +0000
+++ debian/changelog	2010-09-16 08:21:05 +0000
@@ -1,5 +1,8 @@
 python-apt (0.7.97.2) UNRELEASED; urgency=low
 
+  [ Tshepang Lekhonkhobe ]
+  * a bunch of doc improvements (EG: consistency fixes, grammar improvements)
+
   [ Michael Vogt ]
   * python/acquire.cc:
     - return long long when calling TotalNeeded(), FetchNeeded() and


--- End Message ---
--- Begin Message ---
Source: python-apt
Source-Version: 0.8.0

We believe that the bug you reported is fixed in the latest version of
python-apt, which is due to be installed in the Debian FTP archive:

python-apt-common_0.8.0_all.deb
  to main/p/python-apt/python-apt-common_0.8.0_all.deb
python-apt-dbg_0.8.0_amd64.deb
  to main/p/python-apt/python-apt-dbg_0.8.0_amd64.deb
python-apt-dev_0.8.0_all.deb
  to main/p/python-apt/python-apt-dev_0.8.0_all.deb
python-apt-doc_0.8.0_all.deb
  to main/p/python-apt/python-apt-doc_0.8.0_all.deb
python-apt_0.8.0.dsc
  to main/p/python-apt/python-apt_0.8.0.dsc
python-apt_0.8.0.tar.gz
  to main/p/python-apt/python-apt_0.8.0.tar.gz
python-apt_0.8.0_amd64.deb
  to main/p/python-apt/python-apt_0.8.0_amd64.deb
python3-apt-dbg_0.8.0_amd64.deb
  to main/p/python-apt/python3-apt-dbg_0.8.0_amd64.deb
python3-apt_0.8.0_amd64.deb
  to main/p/python-apt/python3-apt_0.8.0_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 597054@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Julian Andres Klode <jak@debian.org> (supplier of updated python-apt package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Format: 1.8
Date: Fri, 27 May 2011 16:12:46 +0200
Source: python-apt
Binary: python-apt python-apt-doc python-apt-dbg python-apt-dev python-apt-common python3-apt python3-apt-dbg
Architecture: source amd64 all
Version: 0.8.0
Distribution: unstable
Urgency: low
Maintainer: jak@debian.org
Changed-By: Julian Andres Klode <jak@debian.org>
Description: 
 python-apt - Python interface to libapt-pkg
 python-apt-common - Python interface to libapt-pkg (locales)
 python-apt-dbg - Python interface to libapt-pkg (debug extension)
 python-apt-dev - Python interface to libapt-pkg (development files)
 python-apt-doc - Python interface to libapt-pkg (API documentation)
 python3-apt - Python 3 interface to libapt-pkg
 python3-apt-dbg - Python 3 interface to libapt-pkg (debug extension)
Closes: 597054 625225 626430 626532
Changes: 
 python-apt (0.8.0) unstable; urgency=low
 .
   * Upload to unstable
 .
   [ Julian Andres Klode ]
   * Increase Breaks for update-notifier to 0.99.3debian9
   * utils/get_debian_mirrors.py: Adjust for new Alioth SCM urls
   * debian/control: Standards-Version 3.9.2
   * Fix Lintian overrides
   * Fix spelling errors reported by Lintian (sep[a->e]rated, overrid[d]en)
   * po/urd.po: Remove, ur.po is the correct file
   * debian/source/format: Add, set it to "3.0 (native)"
 .
   [ Tshepang Lekhonkhobe ]
   * Fix get_changelog in Python 3 (Closes: #626532)
   * apt/package.py: fix a few typos [formated->formatted] (Closes: #597054)
   * doc/source/tutorials/contributing.rst: minor improvements (Closes: #625225)
     - one typo [2to => 2to3], one broken link [pep8.py link]
 .
   [ Translation updates ]
   * Esperanto (Closes: #626430)
Checksums-Sha1: 
 960f1a2b80117fc4d1be44a71f90f419961c6f7a 1297 python-apt_0.8.0.dsc
 00d818ed8bd48a1d3b81d50b40405d6f7a72dc29 352022 python-apt_0.8.0.tar.gz
 414796e68a5a1c8f2b50e377744b4a48238bdbbd 305024 python-apt_0.8.0_amd64.deb
 3b66ee938545d9594e311795835ef9a7d6b9f1d0 224166 python-apt-doc_0.8.0_all.deb
 eb0061e982f601c8f8088da8ffe895cb558e5fc1 4068862 python-apt-dbg_0.8.0_amd64.deb
 951a85afe9a0e499108edd4bcce77dfe2a18a8cc 7628 python-apt-dev_0.8.0_all.deb
 ae487e7c06063cd9dd8797bf9a542538b1854cec 87900 python-apt-common_0.8.0_all.deb
 b3fd1559b04e0c1603fd080332e754b3b01386e5 184720 python3-apt_0.8.0_amd64.deb
 1a6f232c967fb24e2495ab527b40fb80ebcb930e 2030074 python3-apt-dbg_0.8.0_amd64.deb
Checksums-Sha256: 
 c40fb11eee4c80ed72d7871faae0249b31035660a5ef5df5102e4f670be03ba9 1297 python-apt_0.8.0.dsc
 152e2d64896b1128900c3cd550a6abc23dceec5248da5a09c265cd053f3a2612 352022 python-apt_0.8.0.tar.gz
 ff7bc106460b4b593f894a26024aff239b7dca11efcefcaa2bb2e8abb4b62f41 305024 python-apt_0.8.0_amd64.deb
 2b3ce3901f94c9232ee57644d759180f0eb3ecf43c3524756321fb9ac2cb43eb 224166 python-apt-doc_0.8.0_all.deb
 d7adc7bc05d9a6766978fccfdf0e9b4b131bb111ee955ad6e7db316f5753efa1 4068862 python-apt-dbg_0.8.0_amd64.deb
 26c84b0bdc9c0b5ef69a2ac8618b870eb2fbe5084caee5873019cfe49d651641 7628 python-apt-dev_0.8.0_all.deb
 02df8ddd5a3d4691208e50ca9fefaa7e4d8ebd44c927b3fe0293bddf2225ca43 87900 python-apt-common_0.8.0_all.deb
 ea68c65df88102787c8643fe27db7fe2820da014b4406307a7ae63890f1463fb 184720 python3-apt_0.8.0_amd64.deb
 334018ba78abcc8ee08f15a3318c085ea33b1717767c1f35698baebc1c325532 2030074 python3-apt-dbg_0.8.0_amd64.deb
Files: 
 3950ef3153ad2ae8ee4c83b220199f8f 1297 python standard python-apt_0.8.0.dsc
 43b67317f23443ff0e6f50b5c45fab80 352022 python standard python-apt_0.8.0.tar.gz
 4da7f7c89b75240abecf69dcef48f281 305024 python standard python-apt_0.8.0_amd64.deb
 0f2b0a05e5a6fce02af9ab03f9bb7fb1 224166 doc optional python-apt-doc_0.8.0_all.deb
 26b447757ea84e3df29e35b4b80224f5 4068862 debug extra python-apt-dbg_0.8.0_amd64.deb
 58555af87c8a8ff31a9c8fd54b358624 7628 python optional python-apt-dev_0.8.0_all.deb
 220c396d3f3610dfc94c5e1f7590e675 87900 python optional python-apt-common_0.8.0_all.deb
 a99408c4165ced34d861cb815a60a949 184720 python optional python3-apt_0.8.0_amd64.deb
 4067c58a2d5e1384f7ae98d79801a8d6 2030074 debug extra python3-apt-dbg_0.8.0_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEAREDAAYFAk3fs2sACgkQrCpf/gCCPsIWFwCfSXFxvi/IHKuwP0KNRLUilzhh
3dwAniuChk7anrhuFbzuElD7+1tIklSB
=JWQJ
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: