- Drop Python 2.7 and 3.4 support, six no longer required
[941](https://github.com/libgit2/pygit2/issues/941)
- Add Python 3.8 support
[918](https://github.com/libgit2/pygit2/issues/918)
- New support for `/` operator to traverse trees
[903](https://github.com/libgit2/pygit2/pull/903)
[924](https://github.com/libgit2/pygit2/issues/924)
- New `Branch.raw_branch_name`
[954](https://github.com/libgit2/pygit2/pull/954)
- New `Index.remove_all()`
[920](https://github.com/libgit2/pygit2/pull/920)
- New `Remote.ls_remotes(..)`
[935](https://github.com/libgit2/pygit2/pull/935)
[936](https://github.com/libgit2/pygit2/issues/936)
- New `Repository.lookup_reference_dwim(..)` and
`Repository.resolve_refish(..)`
[922](https://github.com/libgit2/pygit2/issues/922)
[923](https://github.com/libgit2/pygit2/pull/923)
- New `Repository.odb` returns new `Odb` type instance. And new
`OdbBackend` type.
[940](https://github.com/libgit2/pygit2/pull/940)
[942](https://github.com/libgit2/pygit2/pull/942)
- New `Repository.references.compress()`
[961](https://github.com/libgit2/pygit2/pull/961)
- Optimization: Load notes lazily
[958](https://github.com/libgit2/pygit2/pull/958)
- Fix spurious exception in config
[916](https://github.com/libgit2/pygit2/issues/916)
[917](https://github.com/libgit2/pygit2/pull/917)
- Minor documentation and cosmetic changes
[919](https://github.com/libgit2/pygit2/pull/919)
[921](https://github.com/libgit2/pygit2/pull/921)
[946](https://github.com/libgit2/pygit2/pull/946)
[950](https://github.com/libgit2/pygit2/pull/950)
Breaking changes:
- Now the Repository has a new attribue `odb` for object database:
Before
repository.read(...)
repository.write(...)
Now
repository.odb.read(...)
repository.odb.write(...)
- Now `Tree[x]` returns a `Object` instance instead of a `TreeEntry`;
`Object.type` returns an integer while `TreeEntry.type` returned a
string:
Before
if tree[x].type == 'tree':
Now
if tree[x].type == GIT_OBJ_TREE:
if tree[x].type_str == 'tree':
- Renamed `TreeEntry._name` to `Object.raw_name`:
Before
tree[x]._name
Now
tree[x].raw_name
- Object comparison is done by id. In the rare case you need to do
tree-entry comparison or sorting:
Before
tree[x] < tree[y]
sorted(list(tree))
Now
pygit2.tree_entry_cmp(x, y) < 0
sorted(list(tree), key=pygit2.tree_entry_key)