Skip to content

Add per-statement timeout for asyncpg - #13503

Open
hansu650 wants to merge 1 commit into
sqlalchemy:mainfrom
hansu650:fix-asyncpg-timeout-7604
Open

Add per-statement timeout for asyncpg#13503
hansu650 wants to merge 1 commit into
sqlalchemy:mainfrom
hansu650:fix-asyncpg-timeout-7604

Conversation

@hansu650

Copy link
Copy Markdown

Fixes: #7604

Description

Adds the asyncpg_timeout execution option requested in #7604 and passes it through to asyncpg for regular statement execution, executemany calls, and server-side cursor creation and fetches.

The change includes unit coverage for each adapter path, a PostgreSQL/asyncpg pg_sleep() integration test that verifies timeout and connection recovery, dialect documentation, and a 2.0 changelog entry.

Local verification:

  • pytest -q test/dialect/postgresql/test_dialect.py — 112 passed, 8 skipped
  • targeted asyncpg timeout unit tests — 4 passed
  • Black and Flake8 on the changed Python files
  • git diff --check

@sqla-tester

Copy link
Copy Markdown
Collaborator

Thanks! Issue #7604 is now marked code review in progress and no longer open for pull requests, so this pull request holds the review for it and another one won't land on top of your work. If this pull request is abandoned, a maintainer can put open for pull requests back on #7604 to reopen it to others.

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.

add execution option for asyncpg_timeout

2 participants