Skip to content

Releases: fork-tongue/patchdiff

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 14 Jul 09:12
9aaaa21

What's Changed

Documentation

  • MkDocs + Material docs site with an API reference (mkdocstrings), a guide (diffing, applying patches, produce()/drafts, serialization, observ integration), and an internals section covering the list-diff algorithm, proxy design, and pointer semantics (#49)
  • Rewritten README pointing at the docs site
  • Rewrite docs prose in a plainer style (#61)

Typing

  • Full modern type hints (PEP 604 unions, builtin generics) checked with ty in CI, Operation TypedDicts for patch shapes, py.typed marker (#49, #50, #52)

Test hardening

  • Hypothesis-based property tests for round-trip diff/apply/iapply/produce and pointer escaping, plus a vendored RFC 6902 conformance corpus (#51, #60)

CI & benchmarking

  • Modernized workflows (pinned actions, uv caching, trimmed steps) (#47)
  • Noise-robust benchmark guard: interleaved master/PR runs compared by fastest-vs-slowest median rather than a single noisy sample (#48)

Performance

  • List diff rewritten from an O(m·n) DP table to Myers' O((m+n)·D) algorithm (#53)
  • produce() hot-path redesign: lazy path recording and epoch-based location memoization instead of eager Pointer allocation on every write (#54)
  • Micro-optimization passes across diff, apply/iapply, and the produce proxy call paths (#55, #56, #57)

Full Changelog: v0.3.12...v1.0.0

Benchmarks: 1.0.0 vs 0.3.12

Median times from 3 interleaved local runs per side (PYTHONHASHSEED=0, GC disabled), same methodology as CI's benchmark guard.

Benchmark 0.3.12 1.0.0 Δ
list_diff_medium[0.1] (Myers vs DP) 340.4 ms 1.85 ms −99.5%
list_diff_completely_different 356.7 ms 107.8 ms −69.8%
dict_diff_flat_500_keys 328.3 µs 148.8 µs −54.7%
set_diff_1000_elements 87.4 µs 60.7 µs −30.5%
produce_deep_leaf_writes[copy] 216.8 µs 133.5 µs −38.4%
produce_in_place_vs_copy_dict 218.8 µs 188.4 µs −13.9%
diff_dict_many_mutations 1.46 ms 1.19 ms −18.3%
apply_dict_many_ops 839.8 µs 788.1 µs −6.2%

The list-diff rewrite dominates: cases with large or scattered edit distance see order-of-magnitude wins, since the DP table's O(m·n) cost no longer applies. A handful of list_diff_similar_* benchmarks (many small localized edits already handled well by the prefix/suffix trim) show a mild regression instead — up to +19% — from Myers' bookkeeping overhead on inputs where the old approach had little left to do; this sits within the noise floor (10–30% run-to-run) and wasn't worth chasing further given the wins elsewhere. Everything else lands within a few percent either way.

v0.3.12

Choose a tag to compare

@github-actions github-actions released this 15 Jun 12:05
19547b2

This release includes the following:

  • Fix proxy leaks and stale paths in produce() (#44)

v0.3.11

Choose a tag to compare

@github-actions github-actions released this 29 May 15:06
3b45478

This release contains the following change:

  • Simplify deepcopy (#42)
    Bumps observ dependency which fixes a problem with stale proxies being used

v0.3.10

Choose a tag to compare

@github-actions github-actions released this 26 May 15:16
6b732fc

Bump version to 0.3.10 (#41)

This version includes the following:

  • ci: Update versions of steps and let setup-uv manage the python version (#40)
  • perf: trim common prefix/suffix in diff_lists (#36)
  • perf: use str.replace in Pointer escape/unescape (#37)
  • fix: produce() snapshots mutable values when recording patches (#34)
  • perf: linear reverse-op construction in diff_dicts/diff_sets (#38)
  • fix: iapply raises on invalid patch paths (#35)
  • fix: to_json mutating caller's ops (#33)

v0.3.9

Choose a tag to compare

@github-actions github-actions released this 17 Mar 09:49
a9ac89e

Bump version to 0.3.9 (#32)

This release fixes a bug for the new produce API introduced in 0.3.8:

  • Fix missing methods on proxies (#31)

v0.3.8

Choose a tag to compare

@github-actions github-actions released this 17 Mar 08:29
75e4772

Bump version to 0.3.8 (#30)

This version includes the following functionality:

  • Updated CI actions and auto-format (#29)
  • Implement proxy-based patch generation (adds produce method, inspired by Immer) (#28)

Known issue

The introduced produce method misses some edge cases and will be fixed in the next release. See #31 .

v0.3.7

Choose a tag to compare

@github-actions github-actions released this 14 Dec 22:28
b895e58

What's Changed

Full Changelog: v0.3.6...v0.3.7

v0.3.6

Choose a tag to compare

@github-actions github-actions released this 20 Nov 07:54
3873699
Bump version to 0.3.6 (#24)

* Iterative Levenshtein distance (can handle larger diffs now) (Iterative Levenshtein distance #21)
* Add benchmark and workflow (Add benchmark and workflow (based on observ's) #22)

v0.3.5

Choose a tag to compare

@github-actions github-actions released this 14 Oct 08:04
6c88122
Tooling update (#20)

* Migrate from poetry to uv

* Configure trusted publishing to PyPi

* Ignore uv.lock

* Migrate flake8 and black to ruff

* Fix for Python 3.9 and 3.8

* No need to checkout the code when publishing

* Revert "No need to checkout the code when publishing"

This reverts commit 94a59bf4f0e331c0a616f2cd2fee086c4d3b98c8.

* Bump version to 0.3.5

Release v0.3.4

Choose a tag to compare

@github-actions github-actions released this 19 Jan 14:03
bf5cad7
Push test coverage to 100% and bump version (#18)

* push test coverage to 100%

* bump version

* maintain tokens inside pointer as a tuple

* add test for Pointer.append