langgraph
langgraph copied to clipboard
feat: add asyncpg support for postgres checkpoint
Description: This PR adds support for asyncpg as an alternative database driver for Postgres checkpoints, providing users with choice between psycopg and asyncpg based on their performance needs and licensing preferences. The implementation maintains full backward compatibility with existing psycopg-based code while offering a new asyncpg implementation with identical API.
Key changes:
- Added new
AsyncPgPostgresSaverclass using asyncpg inlanggraph/checkpoint/postgres_asyncpg/ - Added optional dependencies for asyncpg in pyproject.toml
- Comprehensive test coverage for the new asyncpg implementation
- All existing tests continue to pass with psycopg
- No breaking changes to existing APIs
AsyncPgPostgresSaverworks without installing psycopg
Issue: N/A (feature enhancement)
Dependencies:
- Added
asyncpg>=0.29.0as optional dependency - All existing dependencies remain unchanged
Someone is attempting to deploy a commit to the LangChain Team on Vercel.
A member of the Team first needs to authorize it.