Skip to content

Conversation

@hadrien
Copy link
Owner

@hadrien hadrien commented Nov 11, 2025

Problem

  • FastAPI 0.121.0 introduces dependency scope to close dependency context before response is returned.
  • FastSQLA definitely must close Session before response is returned.

Solution

  • Set scope="function" for Session dependency
  • Allow backward compatibility with FastAPI < 0.121
  • Update tox config to run tests against 2 versions of FastAPI with and without scope support.

@hadrien hadrien merged commit 1b8f528 into main Nov 11, 2025
6 checks passed
@hadrien hadrien deleted the feat/dependency-scope branch November 11, 2025 20:45
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