What’s New In python-apt 1.7¶
Changed¶
Starting with 1.6.1 and 1.7~alpha1, the exception raised when passing objects of a different cache to
apt_pkg.DepCacheisapt_pkg.CacheMismatchError, andapt.cache.Cachewill automatically remap open packages and versions to a new cache.apt_pkg.Policy.get_priority()now acceptsapt_pkg.Versionobjects in addition toapt_pkg.Packageandapt_pkg.PackageFileones.apt.package.Version.policy_prioritynow returns the priority for that version rather than the highest priority for one of its package files.apt.Cache.commit()andapt_pkg.DepCache.commit()now use frontend locking to run dpkg.
Added¶
The class
apt_pkg.PackageRecordscan now lookup custom fields usingrecords[key]andkey in records.All code is now statically typed. Some methods from
apt_pkgandapt_instmight still be missing or more strict than necessary.A new method
apt.cache.Cache.fix_broken()has been added.New methods for frontend locking have been added:
apt_pkg.pkgsystem_lock_inner(),apt_pkg.pkgsystem_unlock_inner(),apt_pkg.pkgsystem_is_locked()(starting in alpha 3).
Deprecated¶
apt_pkg.Policy.get_priority()acceptingapt_pkg.Packageis deprecated.