Skip to content

Release v0.5.1

Latest

Choose a tag to compare

@github-actions github-actions released this 28 Oct 04:15
68c7fff

Fixed

  • A checkpointer or store could fail with prepared statement "_pg3_N" does not exist (SQLSTATE 26000) after a batch failed before its statements ran, even when the error that failed the batch was retryable. psycopg prepares a statement on its sixth run on a connection (prepare_threshold=5, the default), and in pipeline mode it records the statement as prepared before the server confirms it. When an earlier statement in the batch failed, such as BEGIN refused by CockroachDB's license limit, the server never prepared it, but psycopg kept using it. A checkpoint write then failed on its retry. A store read failed on that connection every time until the connection closed, so a pool could hand out the broken connection until it was replaced, by default within an hour. Statements sent in a pipeline are no longer prepared. Statements outside a pipeline, such as the checkpointers' reads on a pool or on a connection without pipeline=True, still are, and every connection keeps its own prepare_threshold.
  • examples/long_term_memory.py and the store guide no longer print pydantic serializer warnings. Their tools now annotate the runtime as ToolRuntime[Context, dict]. A plain ToolRuntime expects no context, and ToolRuntime[Context] fails on Python 3.10, which cannot fill in the default of the second type argument.
  • The checkpointer guide said PostgresSaver's prepare_threshold=0 turns prepared statements off. It prepares every query from its first run.

What's Changed

  • chore(deps-dev): bump ruff from 0.17.1 to 0.17.2 by @dependabot[bot] in #18
  • fix: send statements in a pipeline unprepared for 0.5.1 by @viragtripathi in #20

Full Changelog: v0.5.0...v0.5.1