Repository navigation
Releases: libgit2/pygit2
Release list
1.20.1 (2026-09-12)
-
Update wheels to libgit2 1.9.7
-
New exception hierarchy:
AlreadyExistsError,InvalidSpecError,
InvalidError,NotFoundError,AmbiguousError,AuthError, and
CertificateErrorall inherit fromGitErrorand the appropriate Python
built-in exception (ValueError/KeyError) for backward compatibility
#830 -
Fix
DiffDelta.is_binaryandDiffDelta.flagsreturning stale values for
deltas obtained fromDiff.deltas; flags are now loaded lazily
#962
#1100 -
Fix
repo.submodules.get()andname in repo.submodulesraising
AlreadyExistsErrorwhen a repository exists at the submodule path but was
never registered as a submodule; they now returnNoneandFalse
respectively as documented
#1487 -
Fix leaks and crashes in error paths
#1478
#1479
#1480
#1481 -
Fix custom ODB and refdb backend callbacks overwriting a pending Python
exception (e.g.RuntimeError) with a stale libgit2 error message. -
Documentation fixes
#1490 -
CI (macOS): build architecture-specific OpenSSL/libssh2/libgit2
dependencies instead of universal binaries, producing smaller wheels.
1.20.0 (2026-08-08)
-
New
RemoteCallbacks.custom_headers()
#1465 -
New rebase API:
Repository.rebase_init(...),Repository.rebase_open(...),
Rebase, andRebaseOperation
#1483 -
Fix
Config.snapshot()for non-repository configs, allowPathLikein
Config.__init__(), and improve config documentation
#1468 -
Fix
UnicodeDecodeErrorwith non-UTF-8 file paths inRepository.status(),
DiffFile.path, index paths, checkout callbacks, and related APIs
#1451
#1469 -
Fix
enums.CheckoutStrategy.CONFLICT_STYLE_ZDIFF3, which was mistakenly
bound to theDIFF3constant
#1483 -
Fix crashes and reference-lifetime bugs in custom refdb backends
#1471
#1474
#1475
#1476 -
Update wheels to libgit2 1.9.6 and OpenSSL 3.5.7
-
Add riscv64 wheels
#1463
Breaking changes:
-
Remove deprecated
pygit2.legacyenumsmodule andGIT_*constants,
usepygit2.enumsinstead -
Remove deprecated support for passing
strtoRepository.merge(...),
pass aCommit,Oid, orReferenceobject instead -
Repository.merge_file_from_index(...)now returnsMergeFileResultby
default; passuse_deprecated=Truefor the previous string return, now
deprecated. -
Remove deprecated
Remote.ls_remotes(...), useRemote.list_heads(...)
instead -
Remove
pygit2.to_bytes(...)andpygit2.to_str(...); they were undocumented
accidental public APIs
