-
Notifications
You must be signed in to change notification settings - Fork 26
fix: JsonPlusRedisSerializer handling proper Serialization of Interrupt #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: JsonPlusRedisSerializer handling proper Serialization of Interrupt #108
Conversation
|
@bsbodden please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR addresses a real issue, but conflicts with PR #112. Needs modifications before merging.
Your PR includes this code (lines 43-52 in diff):
try:
from langgraph.types import Interrupt
if isinstance(obj, Interrupt):
# Serialize Interrupt as a constructor format for proper deserialization
return super().dumps(obj)
except ImportError:
passThis conflicts with PR #112 which removes the try/except pattern and changes dumps() to use orjson.dumps(obj, default=self._default) directly.
PR #112 establishes the correct pattern: always use orjson with the default handler
rebase this PR and:
-
Remove the special Interrupt handling in dumps() (lines 43-52)
- The
_defaulthandler should already serialize Interrupts correctly - Test to confirm this works
- The
-
Update tests if needed
Great work identifying and fixing this bug! 🎉
|
@bsbodden please check now |
|
@bsbodden is their any other issue? |
Takes care of the following issue raised in langchain: langchain-ai/langchain#33556