From b05afad5ebdc7fbcef4988543597a33fa0dbebf6 Mon Sep 17 00:00:00 2001 From: Angela Liss <59097311+angela-tarantula@users.noreply.github.com> Date: Tue, 31 Mar 2026 22:12:35 -0400 Subject: [PATCH 1/2] fix earlier docs --- .github/workflows/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 5815f0e..3312d27 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -36,7 +36,6 @@ writes: - [`scorecard.yml`](scorecard.yml) - [`dependabot-update-openapi-snapshots.yml`](dependabot-update-openapi-snapshots.yml) - (mints app token before regenerating and committing snapshots) This keeps write operations explicit and reduces default token blast radius. From 033807f67180a5f00c3782d7cea5fd876c692e2c Mon Sep 17 00:00:00 2001 From: Angela Liss <59097311+angela-tarantula@users.noreply.github.com> Date: Tue, 31 Mar 2026 22:18:08 -0400 Subject: [PATCH 2/2] my upstream bugfix was merged, so _DEFAULT_POINTER_CLS can be simpler hack --- jsonpatchx/backend.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/jsonpatchx/backend.py b/jsonpatchx/backend.py index 65d498b..aa3316f 100644 --- a/jsonpatchx/backend.py +++ b/jsonpatchx/backend.py @@ -90,8 +90,7 @@ def parts(self) -> Sequence[str]: class _DEFAULT_POINTER_CLS(JsonPointer): # type: ignore[misc] - # fixes https://github.com/stefankoegl/python-json-pointer/issues/63 - # and https://github.com/stefankoegl/python-json-pointer/issues/70 + # fixes https://github.com/stefankoegl/python-json-pointer/issues/70 @override @classmethod def get_part(cls, doc, part): # type: ignore[no-untyped-def] @@ -100,21 +99,8 @@ def get_part(cls, doc, part): # type: ignore[no-untyped-def] f"Cannot apply token {part!r} to non-container type {type(doc)}" ) key = super().get_part(doc, part) - if isinstance(key, int) and not _NONNEGATIVE_ARRAY_INDEX_PATTERN.fullmatch( - str(part) - ): - raise JPException("'%s' is not a valid sequence index" % part) return key - @override - def to_last(self, doc): # type: ignore[no-untyped-def] # pragma: no cover - doc, key = super().to_last(doc) - if isinstance(key, int) and not _NONNEGATIVE_ARRAY_INDEX_PATTERN.fullmatch( - str(self.parts[-1]) - ): - raise JPException("'%s' is not a valid sequence index" % self.parts[-1]) - return doc, key - @override def walk(self, doc, part): # type: ignore[no-untyped-def] part = self.get_part(doc, part) # type: ignore[no-untyped-call]