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.DepCache
isapt_pkg.CacheMismatchError
, andapt.cache.Cache
will automatically remap open packages and versions to a new cache.apt_pkg.Policy.get_priority()
now acceptsapt_pkg.Version
objects in addition toapt_pkg.Package
andapt_pkg.PackageFile
ones.apt.package.Version.policy_priority
now 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.PackageRecords
can now lookup custom fields usingrecords[key]
andkey in records
.All code is now statically typed. Some methods from
apt_pkg
andapt_inst
might 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.Package
is deprecated.