summaryrefslogtreecommitdiffstats
path: root/doc/source/whatsnew/1.7.rst
blob: 38485f7e98dc7e91e8ee7b1b926dd422cabb3350 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 :class:`apt_pkg.DepCache`
  is :class:`apt_pkg.CacheMismatchError`, and :class:`apt.cache.Cache` will
  automatically remap open packages and versions to a new cache.

* :meth:`apt_pkg.Policy.get_priority()` now accepts :class:`apt_pkg.Version`
  objects in addition to :class:`apt_pkg.Package` and :class:`apt_pkg.PackageFile`
  ones.

* :attr:`apt.package.Version.policy_priority` now returns the priority
  for that version rather than the highest priority for one of its
  package files.

* :meth:`apt.Cache.commit` and :meth:`apt_pkg.DepCache.commit` now use
  frontend locking to run dpkg.

Added
------
* The class :class:`apt_pkg.PackageRecords` can now lookup custom fields
  using ``records[key]`` and ``key in records``.


* All code is now statically typed. Some methods from :mod:`apt_pkg`
  and :mod:`apt_inst` might still be missing or more strict than
  necessary.

* A new method :meth:`apt.cache.Cache.fix_broken` has been added.

* New methods for frontend locking have been added:
  :meth:`apt_pkg.pkgsystem_lock_inner`,
  :meth:`apt_pkg.pkgsystem_unlock_inner`,
  :meth:`apt_pkg.pkgsystem_is_locked` (starting in alpha 3).

Deprecated
----------
* :meth:`apt_pkg.Policy.get_priority()` accepting :class:`apt_pkg.Package`
  is deprecated.