Skip to content

0.3.22

Choose a tag to compare

@github-actions github-actions released this 01 Apr 15:05

langgraph 0.3.22

Summary of Changes

  • Improved error display by removing internal frames from tracebacks, making it easier to identify the actual source of errors (#4054)
  • Added a copy() method to all channel classes for more efficient state copying, improving performance (#4106)
  • Improved thread safety with new LazyAtomicCounter implementation (#4101)
  • Enhanced support for Python 3.12 with optional eager task execution (#4055)
  • Fixed type annotation for destinations parameter in StateGraph.add_node() (#4053)
  • Refactored checkpoint handling for better consistency and performance (#4103, #4105)
  • Improved handling of resume values in PregelScratchpad (#4098)
  • Refactored StateGraph edge handling for better consistency (#4064)

Detailed Changes

langgraph.pregel.runner.PregelRunner

  • Improved error tracebacks by removing internal frames from stack traces, making it easier to identify the actual source of errors (#4054)
  • The library now filters out internal frames from langgraph, making error messages cleaner and more useful

langgraph.channels.base.BaseChannel and all channel implementations

  • Added a new copy() method to all channel classes for more efficient state copying (#4106)
  • Improved handling of checkpoints with consistent usage of MISSING constant instead of None (#4103)
  • Updated method signatures to remove Optional types where appropriate
  • Enhanced checkpoint methods for better consistency across channel types (#4105)

langgraph.pregel.algo.LazyAtomicCounter

  • Added a new thread-safe counter implementation that lazily initializes only when needed (#4101)
  • Used for various counters in PregelScratchpad to improve thread safety

langgraph.pregel.algo.local_read

  • Refactored to use the new channel copy() method instead of creating checkpoints, significantly improving performance (#4106)
  • Simplified interface by removing unnecessary parameters

langgraph.utils.future.run_coroutine_threadsafe

  • Added support for "lazy" task execution control (#4055)
  • Added support for eager tasks when running on Python 3.12
  • Improved detection of when the current thread is already using the target event loop

langgraph.graph.state.StateGraph

  • Fixed type annotation for destinations parameter in add_node() to correctly support tuples with multiple strings (#4053)
  • Refactored edge handling for more consistent behavior (#4064)
  • Changed some list types to tuples for immutability
  • Added a constant for branch channel formatting

langgraph.types.PregelScratchpad

  • Made the dataclass immutable for better safety (#4098)
  • Improved handling of resume values with better null value management

langgraph.pregel.checkpoint.create_checkpoint

  • Moved checkpoint creation to its own module for better organization (#4105)
  • Improved handling of MISSING values in checkpoint creation