Upgrade to release 1.0.0:
- Minimum supported Python is now 3.9 (Python 2 dropped).
- PatchedFile.path now also strips git mnemonic prefixes (c/ i/ o/
w/ and 1/ 2/), so git diff --cached paths resolve to the plain
filename (c/README.md -> README.md). Standard a//b/ diffs are
unaffected.
- File modes via source_mode/target_mode + an is_symlink property.
- PatchedFile.diff_line_no to locate hunkless/binary entries.
- Accept bytes input directly (decoded with the given encoding,
default UTF-8).
- Real PEP 484 type annotations + generics (typed iteration) and a
py.typed marker.
- Parse difflib empty-filename output and fix a trailing-newline
error on hunkless git format-patch files; includes the
quoted-filename fix missing from 0.7.5
- from_filename/from_string gain metadata_only; python -m unidiff
works; packaging on pyproject.toml with GitHub Actions CI.
Fixes:
WARNING: python3-unidiff-1.0.0-r0 do_check_backend: QA Issue:
inherits setuptools3 but has pyproject.toml with
setuptools.build_meta, use the correct class [pep517-backend]
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>