Pygit2

Latest version: v1.16.0

Safety actively analyzes 687918 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 10 of 12

0.23.3

- New `Repository.create_blob_fromiobase(...)`
[490](https://github.com/libgit2/pygit2/pull/490)
[577](https://github.com/libgit2/pygit2/pull/577)
- New `Repository.describe(...)`
[585](https://github.com/libgit2/pygit2/pull/585)
- Fix `Signature` default encoding, UTF-8 now
[581](https://github.com/libgit2/pygit2/issues/581)
- Fixing `pip install pygit2`, should install cffi first
- Unit tests, fix binary diff test
[586](https://github.com/libgit2/pygit2/pull/586)
- Document that `Diff.patch` can be `None`
[587](https://github.com/libgit2/pygit2/pull/587)

0.23.2

- Unify callbacks system for remotes and clone
[568](https://github.com/libgit2/pygit2/pull/568)
- New `TreeEntry._name`
[570](https://github.com/libgit2/pygit2/pull/570)
- Fix segfault in `Tag._message`
[572](https://github.com/libgit2/pygit2/pull/572)
- Documentation improvements
[569](https://github.com/libgit2/pygit2/pull/569)
[574](https://github.com/libgit2/pygit2/pull/574)

API changes to clone:

Before
clone_repository(..., credentials, certificate)

Now
callbacks = RemoteCallbacks(credentials, certificate)
clone_repository(..., callbacks)

API changes to remote:

Before
def transfer_progress(stats):
...

remote.credentials = credentials
remote.transfer_progress = transfer_progress
remote.fetch()
remote.push(specs)

Now
class MyCallbacks(RemoteCallbacks):
def transfer_progress(self, stats):
...

callbacks = MyCallbacks(credentials)
remote.fetch(callbacks=callbacks)
remote.push(specs, callbacks=callbacks)

0.23.1

- Improve support for cffi 1.0+
[529](https://github.com/libgit2/pygit2/pull/529)
[561](https://github.com/libgit2/pygit2/pull/561)
- Fix `Remote.push` [557](https://github.com/libgit2/pygit2/pull/557)
- New `TreeEntry.type`
[560](https://github.com/libgit2/pygit2/pull/560)
- New `pygit2.GIT_DIFF_SHOW_BINARY`
[566](https://github.com/libgit2/pygit2/pull/566)

0.23.0

- Update to libgit2 v0.23
[540](https://github.com/libgit2/pygit2/pull/540)
- Now `Repository.merge_base(...)` returns `None` if no merge base is
found [550](https://github.com/libgit2/pygit2/pull/550)
- Documentation updates
[547](https://github.com/libgit2/pygit2/pull/547)

API changes:

- How to set identity (aka signature) in a reflog has changed:

Before
signature = Signature('foo', 'bar')
...
reference.set_target(target, signature=signature, message=message)
repo.set_head(target, signature=signature)
remote.fetch(signature=signature)
remote.push(signature=signature)

Now
repo.set_ident('foo', 'bar')
...
reference.set_target(target, message=message)
repo.set_head(target)
remote.push()

The current identity can be get with
repo.ident

- Some remote setters have been replaced by methods:

Before Now
Remote.url = url Repository.remotes.set_url(name, url)
Remote.push_url = url Repository.remotes.set_push_url(name, url)

Remote.add_fetch(refspec) Repository.remotes.add_fetch(name, refspec)
Remote.add_push(refspec) Repository.remotes.add_push(name, refspec)

Remote.fetch_refspecs = [...] removed, use the config API instead
Remote.push_refspecs = [...] removed, use the config API instead

0.22.1

Diff interface refactoring
[346](https://github.com/libgit2/pygit2/pull/346) (in progress):

- New `iter(pygit2.Blame)`

- New `pygit2.DiffDelta`, `pygit2.DiffFile` and `pygit.DiffLine`

- API changes, translation table:

Hunk => DiffHunk
Patch.old_file_path => Patch.delta.old_file.path
Patch.new_file_path => Patch.delta.new_file.path
Patch.old_id => Patch.delta.old_file.id
Patch.new_id => Patch.delta.new_file.id
Patch.status => Patch.delta.status
Patch.similarity => Patch.delta.similarity
Patch.is_binary => Patch.delta.is_binary
Patch.additions => Patch.line_stats[1]
Patch.deletions => Patch.line_stats[2]

- `DiffHunk.lines` is now a list of `DiffLine` objects, not tuples

New features:

- New `Repository.expand_id(...)` and `Repository.ahead_behind(...)`
[448](https://github.com/libgit2/pygit2/pull/448)
- New `prefix` parameter in `Repository.write_archive`
[481](https://github.com/libgit2/pygit2/pull/481)
- New `Repository.merge_trees(...)`
[489](https://github.com/libgit2/pygit2/pull/489)
- New `Repository.cherrypick(...)`
[436](https://github.com/libgit2/pygit2/issues/436)
[492](https://github.com/libgit2/pygit2/pull/492)
- New support for submodules
[499](https://github.com/libgit2/pygit2/pull/499)
[514](https://github.com/libgit2/pygit2/pull/514)
- New `Repository.merge_file_from_index(...)`
[503](https://github.com/libgit2/pygit2/pull/503)
- Now `Repository.diff` supports diffing two blobs
[508](https://github.com/libgit2/pygit2/pull/508)
- New optional `fetch` parameter in `Remote.create`
[526](https://github.com/libgit2/pygit2/pull/526)
- New `pygit2.DiffStats`
[406](https://github.com/libgit2/pygit2/issues/406)
[525](https://github.com/libgit2/pygit2/pull/525)
- New `Repository.get_attr(...)`
[528](https://github.com/libgit2/pygit2/pull/528)
- New `level` optional parameter in `Index.remove`
[533](https://github.com/libgit2/pygit2/pull/533)
- New `repr(TreeEntry)`
[543](https://github.com/libgit2/pygit2/pull/543)

Build and install improvements:

- Make pygit work in a frozen environment
[453](https://github.com/libgit2/pygit2/pull/453)
- Make pygit2 work with pyinstaller
[510](https://github.com/libgit2/pygit2/pull/510)

Bugs fixed:

- Fix memory issues
[477](https://github.com/libgit2/pygit2/issues/477)
[487](https://github.com/libgit2/pygit2/pull/487)
[520](https://github.com/libgit2/pygit2/pull/520)
- Fix TreeEntry equality testing
[458](https://github.com/libgit2/pygit2/issues/458)
[488](https://github.com/libgit2/pygit2/pull/488)
- `Repository.write_archive` fix handling of symlinks
[480](https://github.com/libgit2/pygit2/pull/480)
- Fix type check in `Diff[...]`
[495](https://github.com/libgit2/pygit2/issues/495)
- Fix error when merging files with unicode content
[505](https://github.com/libgit2/pygit2/pull/505)

Other:

- Documentation improvements and fixes
[448](https://github.com/libgit2/pygit2/pull/448)
[491](https://github.com/libgit2/pygit2/pull/491)
[497](https://github.com/libgit2/pygit2/pull/497)
[507](https://github.com/libgit2/pygit2/pull/507)
[517](https://github.com/libgit2/pygit2/pull/517)
[518](https://github.com/libgit2/pygit2/pull/518)
[519](https://github.com/libgit2/pygit2/pull/519)
[521](https://github.com/libgit2/pygit2/pull/521)
[523](https://github.com/libgit2/pygit2/pull/523)
[527](https://github.com/libgit2/pygit2/pull/527)
[536](https://github.com/libgit2/pygit2/pull/536)
- Expose the `pygit2.GIT_REPOSITORY_INIT_*` constants
[483](https://github.com/libgit2/pygit2/issues/483)

0.22.0

New:

- Update to libgit2 v0.22
[459](https://github.com/libgit2/pygit2/pull/459)
- Add support for libgit2 feature detection (new `pygit2.features` and
`pygit2.GIT_FEATURE_*`)
[475](https://github.com/libgit2/pygit2/pull/475)
- New `Repository.remotes` (`RemoteCollection`)
[447](https://github.com/libgit2/pygit2/pull/447)

API Changes:

- Prototype of `clone_repository` changed, check documentation
- Removed `clone_into`, use `clone_repository` with callbacks instead
- Use `Repository.remotes.rename(name, new_name)` instead of
`Remote.rename(new_name)`
- Use `Repository.remotes.delete(name)` instead of `Remote.delete()`
- Now `Remote.push(...)` takes a list of refspecs instead of just one
- Change `Patch.old_id`, `Patch.new_id`, `Note.annotated_id`,
`RefLogEntry.oid_old` and `RefLogEntry.oid_new` to be `Oid` objects
instead of strings
[449](https://github.com/libgit2/pygit2/pull/449)

Other:

- Fix `init_repository` when passing optional parameters
`workdir_path`, `description`, `template_path`, `initial_head` or
`origin_url` [466](https://github.com/libgit2/pygit2/issues/466)
[471](https://github.com/libgit2/pygit2/pull/471)
- Fix use-after-free when patch outlives diff
[457](https://github.com/libgit2/pygit2/issues/457)
[461](https://github.com/libgit2/pygit2/pull/461)
[474](https://github.com/libgit2/pygit2/pull/474)
- Documentation improvements
[456](https://github.com/libgit2/pygit2/issues/456)
[462](https://github.com/libgit2/pygit2/pull/462)
[465](https://github.com/libgit2/pygit2/pull/465)
[472](https://github.com/libgit2/pygit2/pull/472)
[473](https://github.com/libgit2/pygit2/pull/473)
- Make the GPL exception explicit in setup.py
[450](https://github.com/libgit2/pygit2/pull/450)

Page 10 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.