What’s New In python-apt 1.0¶
Python-Apt 1.0 fixes several issues and use of deprecated methods. Most importantly, it introduces large file support
New features¶
apt_pkg.AcquireFilecan now take a hash string that is not an md5 value, using the new hash argument.- A new a
apt_pkg.TagFile.close()method was added apt_pkg.TagFileis now a context manager- The high-level cache class,
apt.cache.Cacheand it’s companionapt.cache.FilteredCachenow support package names with special architecture qualifiers such as :all and :native. - The method
apt.cache.Cache.connect2()allows connecting callbacks on cache changes that take the cache as their first argument, reducing the potential for reference cycles.
Deprecated¶
The following features are deprecated, starting with this release:
- The section member of
apt_pkg.Package - The files member of of
apt_pkg.SourceRecords - The md5 argument to
apt_pkg.AcquireFile, it is replaced by the hash argument. - The method
apt.cache.Cache.connect()has been deprecated. It is replaced byapt.cache.Cache.connect2()which is more flexible and less prone to reference cycles.
Removed¶
The module
apt.progress.gtk2has been removed. There were no users in the Debian archive, its last update was in 2013, and it was buggy already. Apart from that, it suggested that it is OK to run a graphical application as root, and used the unmaintained GTK+ 2 version.Therefore, there is no replacement, please use PackageKit or aptdaemon for installation in graphical environments.
The attribute
apt_pkg.Package.autowas not set anymore, and thus removed.
Maintenance¶
- The classes
apt.cache.Cacheandapt.cache.FilteredCacheno longer store cyclic references to/between them. This fixes a huge issue, because a cache can have tens of open file descriptors, causing the maximum of file descriptors to be reached easily. apt_instnow supports ar and tar archives that are larger than 4 GiB- Various smaller bug fixes