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.40
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.41
Choose a head ref
  • 7 commits
  • 9 files changed
  • 2 contributors

Commits on Nov 2, 2026

  1. Ship type stubs as a jsonpatch-stubs package (#158)

    mypy reported "module is installed, but missing library stubs or py.typed
    marker" for jsonpatch. PEP 561 has no py.typed marker for single-file
    modules, so the types are shipped as a stub-only package, jsonpatch-stubs,
    in the same distribution, which type checkers pick up automatically. This
    keeps jsonpatch.py a single module without annotations.
    
    JSON documents are typed as Any, as they can be any JSON value and the
    module accepts arbitrary Mapping / Sequence types. Patches are typed as
    str | bytes | Iterable[Mapping[str, Any]].
    
    A new CI job runs mypy's stubtest to check that the stubs agree with
    jsonpatch.py, and type-checks typical usage (typetests/usage.py) against
    the installed distribution with mypy --strict, including usage that must
    be rejected.
    
    Released jsonpointer versions are untyped, so pyproject.toml tells mypy to
    ignore that; the stubs also pass against the typed jsonpointer from
    stefankoegl/python-json-pointer#106.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    Claude-Session: https://claude.ai/code/session_01Pewzpj8LrcYUx1DeTxFCMg
    claude committed Nov 2, 2026
    Configuration menu
    Copy the full SHA
    76e4506 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cec2647 View commit details
    Browse the repository at this point in the history
  3. Require jsonpointer 3.8, which ships type stubs

    jsonpointer 3.8 includes its own type stubs, so mypy no longer needs to
    ignore it, and JsonPointer / pointer_cls in the jsonpatch stubs now have
    real types instead of Any. The usage type test now also covers a custom
    JsonPointer subclass as pointer_cls, and rejects a pointer_cls that is not
    one.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    Claude-Session: https://claude.ai/code/session_01Pewzpj8LrcYUx1DeTxFCMg
    claude committed Nov 2, 2026
    Configuration menu
    Copy the full SHA
    a839944 View commit details
    Browse the repository at this point in the history
  4. Re-export JsonPointer and JsonPointerException in the stubs

    jsonpatch.py imports both from jsonpointer, so jsonpatch.JsonPointer and
    jsonpatch.JsonPointerException work at runtime (ext_tests.py catches the
    latter). In a .pyi file, imports are private unless re-exported with a
    same-name alias, so type checkers rejected these uses. stubtest doesn't
    notice, as it skips names defined in other modules, so the usage type
    test now covers them.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    Claude-Session: https://claude.ai/code/session_01Pewzpj8LrcYUx1DeTxFCMg
    claude committed Nov 2, 2026
    Configuration menu
    Copy the full SHA
    fedf807 View commit details
    Browse the repository at this point in the history
  5. Accept bytearray in JsonPatch.from_string's type

    The default loader (json.loads) accepts bytearray, and from_string passes
    its input on unchanged, so JsonPatch.from_string(bytearray(...)) works at
    runtime. apply_patch keeps str | bytes: it treats a bytearray as a
    sequence of operations and fails, so the usage test checks that type
    checkers reject that.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    Claude-Session: https://claude.ai/code/session_01Pewzpj8LrcYUx1DeTxFCMg
    claude committed Nov 2, 2026
    Configuration menu
    Copy the full SHA
    ac82662 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #249 from stefankoegl/claude/nifty-brahmagupta-n8vroj

    Ship type stubs as a jsonpatch-stubs package
    stefankoegl authored Nov 2, 2026
    Configuration menu
    Copy the full SHA
    9e780d5 View commit details
    Browse the repository at this point in the history
  7. bump version to 1.41

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