Skip to content

Commit 092c9ec

Browse files
authored
chore: update ormsgpack minbound and add OPT_REPLACE_SURROGATES (#6395)
This lets the default `msgpack` serialization mode handle more cases where user data contains invalid unicode.
1 parent 8336686 commit 092c9ec

File tree

8 files changed

+643
-590
lines changed

8 files changed

+643
-590
lines changed

libs/checkpoint-postgres/uv.lock

Lines changed: 51 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/checkpoint-sqlite/uv.lock

Lines changed: 51 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/checkpoint/langgraph/checkpoint/serde/jsonplus.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,7 @@ def __init__(self, message: str):
640640
| ormsgpack.OPT_PASSTHROUGH_DATETIME
641641
| ormsgpack.OPT_PASSTHROUGH_ENUM
642642
| ormsgpack.OPT_PASSTHROUGH_UUID
643+
| ormsgpack.OPT_REPLACE_SURROGATES
643644
)
644645

645646

libs/checkpoint/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "langgraph-checkpoint"
7-
version = "3.0.0"
7+
version = "3.0.1"
88
description = "Library with base interfaces for LangGraph checkpoint savers."
99
authors = []
1010
requires-python = ">=3.10"
@@ -13,7 +13,7 @@ license = "MIT"
1313
license-files = ['LICENSE']
1414
dependencies = [
1515
"langchain-core>=0.2.38",
16-
"ormsgpack>=1.10.0",
16+
"ormsgpack>=1.12.0",
1717
]
1818

1919
[project.urls]

libs/checkpoint/tests/test_jsonplus.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -149,20 +149,20 @@ def test_serde_jsonplus() -> None:
149149
assert serde.loads_typed(serde.dumps_typed(value)) == value
150150

151151
surrogates = [
152-
"Hello\ud83d\ude00",
153-
"Python\ud83d\udc0d",
154-
"Surrogate\ud834\udd1e",
155-
"Example\ud83c\udf89",
156-
"String\ud83c\udfa7",
157-
"With\ud83c\udf08",
158-
"Surrogates\ud83d\ude0e",
159-
"Embedded\ud83d\udcbb",
160-
"In\ud83c\udf0e",
161-
"The\ud83d\udcd6",
162-
"Text\ud83d\udcac",
152+
"Hello??",
153+
"Python??",
154+
"Surrogate??",
155+
"Example??",
156+
"String??",
157+
"With??",
158+
"Surrogates??",
159+
"Embedded??",
160+
"In??",
161+
"The??",
162+
"Text??",
163163
"收花🙄·到",
164164
]
165-
serde = JsonPlusSerializer(pickle_fallback=True)
165+
serde = JsonPlusSerializer(pickle_fallback=False)
166166

167167
assert serde.loads_typed(serde.dumps_typed(surrogates)) == surrogates
168168

libs/checkpoint/uv.lock

Lines changed: 421 additions & 369 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/langgraph/uv.lock

Lines changed: 53 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/prebuilt/uv.lock

Lines changed: 52 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)