unstale

pypi / unidiff

unidiff

What changed in unidiff 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-24.

4 breaking9 new APIs and options1 behavior and defaults1 tooling6 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.5 on npm

unidiff 121 changes

Breaking changes 4

  • Parsing raises UnidiffParseError when a target header has no source.

    1.0.1release notes

  • The minimum supported Python version is now 3.9; Python 2 is dropped.

    1.0.0release notes

  • The path also strips git mnemonic prefixes such as c/ and i/, so paths from git diff --cached resolve to the plain filename.

    1.0.0release notes

  • Packaging moves to pyproject.toml.

    1.0.0release notes

New APIs and options 9

  • Exposes git submodule file mode through is_submodule.

    1.0.1release notes

  • from_filename gains the metadata_only option.

    1.0.0release notes

  • from_string gains the metadata_only option.

    1.0.0release notes

  • A property now indicates whether a patched file is a symlink.

    1.0.0release notes

  • This API locates hunkless or binary entries.

    1.0.0release notes

  • A py.typed marker is included for typed-package support.

    1.0.0release notes

  • The package can now be run as a Python module.

    1.0.0release notes

  • File modes are now available through source_mode.

    1.0.0release notes

  • File modes are now available through target_mode.

    1.0.0release notes

Behavior and default changes 1

  • Input can be passed directly as bytes and is decoded with the given encoding, defaulting to UTF-8.

    1.0.0release notes

Tooling 1

  • The code now has PEP 484 type annotations and generics, including typed iteration.

    1.0.0release notes

Fixes and other changes 6

  • Parsing handles binary diffs that do not have a target filename.

    1.0.1release notes

  • Parsing handles consecutive added files that share a /dev/null source.

    1.0.1release notes

  • Parsing handles empty context lines, including DOS context lines, when metadata_only is enabled.

    1.0.1release notes

  • The parser now accepts difflib output with empty filenames.

    1.0.0release notes

  • A trailing-newline error on hunkless git format-patch files is fixed.

    1.0.0release notes

  • The quoted-filename parsing fix missing from 0.7.5 is included.

    1.0.0release notes