Skip to content

docs: add async-specific note to expire/expire_all proxied docstrings - #13453

Open
harshitayadavv wants to merge 1 commit into
sqlalchemy:mainfrom
harshitayadavv:docs/async-session-expire-notes
Open

docs: add async-specific note to expire/expire_all proxied docstrings#13453
harshitayadavv wants to merge 1 commit into
sqlalchemy:mainfrom
harshitayadavv:docs/async-session-expire-notes

Conversation

@harshitayadavv

Copy link
Copy Markdown

Description

Follow-up to #13443, adds a .. tip:: note to AsyncSession.expire_all() and AsyncSession.expire()'s generated docstrings, describing the lazy-loading-under-async behavior per @zzzeek's guidance, without naming MissingGreenlet directly.

This required a small addition to tools/generate_proxy_methods.py since the async proxy docstrings are generated from the sync originals, and there wasn't previously a way to inject method-specific extra notes during that generation step. Added an ASYNC_METHOD_NOTES dict keyed by method name, only applied when generating for asyncio modules (scoped_session's sync-to-sync proxying is unaffected).

Ran python tools/generate_proxy_methods.py --module sqlalchemy.ext.asyncio.session locally to confirm the generated diff is clean and minimal.

Checklist

This pull request is:

  • A documentation / typographical / small typing error fix
    • Good to go, no issue or tests are needed
  • A short code fix
  • A new feature implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants