History
-------

1.0.0 - 2026-07-25
------------------

* Dropped Python 2 support; the minimum supported version is now Python 3.9.
* Converted to real PEP 484 type annotations and generic containers, and
  shipped a py.typed marker (#117).
* Migrated packaging to pyproject.toml; the sdist now includes the tests
  (#99), and the `unidiff` command is also runnable as `python -m unidiff`.
* Replaced Travis CI with GitHub Actions (tests + mypy).
* Exposed git file modes via PatchedFile.source_mode / target_mode and an
  is_symlink property (#125).
* Added support for git mnemonic source/target prefixes (i/ w/ c/ o/ and
  1/ 2/), which also fixes `git diff --cached` paths (#81, #27).
* Exposed PatchedFile.diff_line_no to locate hunkless (e.g. binary) file
  entries in the diff (#122).
* PatchSet and PatchSet.from_string now accept bytes input directly,
  decoding with the given encoding (default UTF-8) (#43).
* PatchSet.from_filename and PatchSet.from_string now accept the
  metadata_only argument.
* Parse diffs with empty filenames, e.g. difflib.unified_diff output (#115).
* Fixed a trailing-newline parse error on hunkless files in git
  format-patch output (#73, #74).
* Documented parsing of content with embedded carriage returns / control
  characters (#120).
* Rewrote the README in Markdown.

0.7.5 - 2023-03-09
------------------

* Fixed issue with spaces in filename when using custom git prefix.
* Support binary patch format.

0.7.4 - 2022-06-26
------------------

* Fixed git diff parsing issues (filename with spaces, only one added/deleted file).

0.7.3 - 2022-02-06
------------------

* Fixed RE_BINARY_DIFF regex to make it a raw string.

0.7.2 - 2022-01-28
------------------

* Fixed issue when parsing git diff header generated with `--no-prefix`.

0.7.1 - 2022-01-27
------------------

* Improved git added/deleted file detection.
* Added `newline` optional param when parsing `from_filename`.

0.7.0 - 2021-08-16
------------------

* Fixed issues handling multiple git renames.
* Renamed files return target filename as PatchedFile.path.
* Fixed error when first change is a binary file.
* Added source code type hints.

0.6.0 - 2020-05-07
----------------

* Updated PatchSet constructor to accept an optional (default to False)
metadata_only parameter to only keep diff metadata information without
the diff text data (better performance).
* Identify and track changed binary files.
* Added support for git rename syntax.

0.5.5 - 2018-01-03
------------------

* Updated PatchSet constructor to accept string data.
* Added support to parse extended patch info.

0.5.4 - 2017-05-26
------------------

* Added PatchSet.from_string helper.
* Do not install tests as top-level package.

0.5.3 - 2017-04-10
------------------

* Re-released 0.5.2 as 0.5.3 because of issues with PyPI.

0.5.2 - 2016-02-02
------------------

* Added diff line number to Line metadata.
* Optimizations for large hunks.
* Fix for git empty new lines.
* Added (optional) errors parameter to PatchSet.from_filename,
to specify how to handle encoding errors.


0.5.1 - 2015-01-18
------------------

* Added (optional) encoding parameter to PatchSet.
* Added support to get any iterable as PatchSet diff argument.


0.5 - 2014-12-14
----------------

* Release on PyPI.
