Skip to content

Conversation

@keenborder786
Copy link

Takes care of the following issue raised in langchain: langchain-ai/langchain#33556

@keenborder786 keenborder786 changed the title fix: JsonPlusRedisSerializer handling proper searlization of Interrupt fix: JsonPlusRedisSerializer handling proper Serialization of Interrupt Oct 22, 2025
@keenborder786
Copy link
Author

@bsbodden please review

Copy link
Contributor

@bsbodden bsbodden left a 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:
    pass

This 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:

  1. Remove the special Interrupt handling in dumps() (lines 43-52)

    • The _default handler should already serialize Interrupts correctly
    • Test to confirm this works
  2. Update tests if needed

Great work identifying and fixing this bug! 🎉

@keenborder786
Copy link
Author

@bsbodden please check now

@keenborder786
Copy link
Author

keenborder786 commented Oct 30, 2025

@bsbodden is their any other issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants