Skip to content

Conversation

@ftsartek
Copy link
Contributor

@ftsartek ftsartek commented Jan 20, 2026

Description

Alters the handling for session/connection providers in the Litestar plugin so that as a fallback they can be captured from the pool rather than the already-created connection.

Because this involves instantiating from the pool, it requires a separate async and sync method depending on the context.

Closes

N/A

In contexts where the connection is not yet available in Litestar - i.e.
guards - it's still possible to get a connection/session from the
plugin's pool (which does exist in state).
This adds handling to fall back to that pool, but requires both a
synchronous and asynchronous approach depending on the plugin context.
@ftsartek ftsartek force-pushed the fix/session-provider branch from 7476ad1 to eef3112 Compare January 20, 2026 07:24
@ftsartek ftsartek changed the title fix: litestar plugin session provider draft: fix: litestar plugin session provider Jan 20, 2026
@ftsartek ftsartek marked this pull request as draft January 20, 2026 07:25
@ftsartek ftsartek changed the title draft: fix: litestar plugin session provider fix: litestar plugin session provider Jan 20, 2026
@ftsartek ftsartek marked this pull request as ready for review January 20, 2026 22:37
@cofin cofin merged commit de7b813 into litestar-org:main Jan 20, 2026
11 checks passed
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.

2 participants