Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: stefankoegl/python-json-patch
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.39
Choose a base ref
...
head repository: stefankoegl/python-json-patch
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.40
Choose a head ref
  • 9 commits
  • 6 files changed
  • 5 contributors

Commits on Nov 2, 2026

  1. Configuration menu
    Copy the full SHA
    11d148c View commit details
    Browse the repository at this point in the history
  2. Attach failing operation to JsonPatchException as op

    Brings #126 up to date with current master. JsonPatchException now
    accepts an optional `op` keyword argument, and all exceptions raised
    while constructing or applying a patch operation carry the failing
    operation (the PatchOperation instance, or the raw operation dict if
    it could not be constructed).
    
    Compared to the original PR, the constructor now forwards the message
    to Exception, which fixes a TypeError ("got multiple values for
    argument 'op'") when raising with both a message and op. Tests added.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01PewzpkvyJUvFMnnjKxmyNd
    Maphey and claude committed Nov 2, 2026
    Configuration menu
    Copy the full SHA
    5eccc03 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #246 from PerchAnton/codex/cli-parse-patch-once

    Reject invalid CLI patches before modifying the input file
    stefankoegl authored Nov 2, 2026
    Configuration menu
    Copy the full SHA
    1a53dd3 View commit details
    Browse the repository at this point in the history
  4. Add option to generate test operations in diffs

    make_patch, JsonPatch.from_diff and DiffBuilder take a new keyword
    argument generate_test_ops (default False). When set, each remove and
    replace operation of the generated patch is preceded by a test
    operation that checks the value it removes or replaces. The patch then
    records the previous values and fails with JsonPatchTestFailed when
    applied to a document that differs there. Removals that the diff turns
    into moves are not tested.
    
    jsondiff gets a matching -t/--test-ops option.
    
    Based on #154 by Robert Cochran, reimplemented on top of the current
    diff engine, which resolves array indices when replaying operations, so
    the test operations get the same indices as the operations they guard.
    The new argument is added after the existing ones, so positional
    callers (including of `optimization`) are unaffected.
    
    Co-Authored-By: Robert Cochran <robert.cochran@peachfinance.com>
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01PewzpidDeSzMcCa4Krt54E
    claude and RobertCochran committed Nov 2, 2026
    Configuration menu
    Copy the full SHA
    80e2796 View commit details
    Browse the repository at this point in the history
  5. Report move/copy and string-entry failures against the original opera…

    …tion
    
    - MoveOperation and CopyOperation delegate to internal, synthetic
      RemoveOperation / AddOperation instances. Exceptions raised by those
      now have `op` set to the enclosing move/copy operation, so callers
      can identify the operation that is actually part of the patch.
    - The "sequence of strings" check in JsonPatch.__init__ now attaches
      the offending entry as `op`.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01PewzpkvyJUvFMnnjKxmyNd
    claude committed Nov 2, 2026
    Configuration menu
    Copy the full SHA
    bafa36c View commit details
    Browse the repository at this point in the history
  6. Merge pull request #247 from stefankoegl/claude/confident-curie-9x5ahd

    Attach failing operation to JsonPatchException as `op`
    stefankoegl authored Nov 2, 2026
    Configuration menu
    Copy the full SHA
    20bfe05 View commit details
    Browse the repository at this point in the history
  7. Copy the values of generated test operations

    The test operations referred to the values in src, so changing src after
    diffing changed what the patch tests.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01PewzpidDeSzMcCa4Krt54E
    claude committed Nov 2, 2026
    Configuration menu
    Copy the full SHA
    b5385cc View commit details
    Browse the repository at this point in the history
  8. Merge pull request #248 from stefankoegl/claude/funny-lamport-kge2fr

    Add option to generate test operations in diffs
    stefankoegl authored Nov 2, 2026
    Configuration menu
    Copy the full SHA
    6a6d1a7 View commit details
    Browse the repository at this point in the history
  9. bump version to 1.40

    stefankoegl committed Nov 2, 2026
    Configuration menu
    Copy the full SHA
    66e1052 View commit details
    Browse the repository at this point in the history
Loading