[PR #579] [CLOSED] Rm isinstance(..., NamedTuple) #1544

Closed
opened 2026-02-20 17:45:00 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraph/pull/579
Author: @hinthornw
Created: 6/3/2024
Status: Closed

Base: mainHead: wfh/named_tuple


📝 Commits (1)

  • 2f48333 Rm isinstance(..., NamedTuple)

📊 Changes

1 file changed (+1 additions, -3 deletions)

View changed files

📝 langgraph/serde/jsonplus.py (+1 -3)

📄 Description

It's a function (not a type), so this line would raise an error.

If we want to custom serialize named tuples, would have to use orjson or separately recursively check for named tuples, since the json stdlib module doesn't permit overriding of stdlib types that are in the default conversion table: https://discuss.python.org/t/allowing-override-of-json-dumps-serialization-for-standard-types/16259/6


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langgraph/pull/579 **Author:** [@hinthornw](https://github.com/hinthornw) **Created:** 6/3/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `wfh/named_tuple` --- ### 📝 Commits (1) - [`2f48333`](https://github.com/langchain-ai/langgraph/commit/2f48333d49e9604b489f10d88cb1a2f23bd60869) Rm isinstance(..., NamedTuple) ### 📊 Changes **1 file changed** (+1 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `langgraph/serde/jsonplus.py` (+1 -3) </details> ### 📄 Description It's a function (not a type), so this line would raise an error. If we want to custom serialize named tuples, would have to use orjson or separately recursively check for named tuples, since the json stdlib module doesn't permit overriding of stdlib types that are in the default conversion table: https://discuss.python.org/t/allowing-override-of-json-dumps-serialization-for-standard-types/16259/6 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-20 17:45:00 -05:00
yindo closed this issue 2026-02-20 17:45:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#1544