Skip to content

Conversation

faizanazim11
Copy link

This pull request updates the session management logic in both the synchronous and asynchronous modules to improve compatibility with FastAPI dependency injection, and bumps the package version to reflect these changes.

FastAPI dependency injection improvements:

  • Updated the get_db function signatures in both sql_db_utils/session_management.py and sql_db_utils/asyncio/session_management.py to use Cookie() instead of Cookie, and made the tenant_id parameter optional by setting a default value of None. This ensures proper dependency injection and avoids errors when the cookie is missing. [1] [2]

Version bump:

  • Increased the package version from 1.3.0 to 1.3.1 in sql_db_utils/__version__.py to reflect the changes.

@faizanazim11 faizanazim11 self-assigned this Oct 4, 2025
@Copilot Copilot AI review requested due to automatic review settings October 4, 2025 21:50
@faizanazim11 faizanazim11 added the bug Something isn't working label Oct 4, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request fixes FastAPI dependency injection issues with tenant-id cookie handling and bumps the package version to reflect these changes.

  • Updated get_db function signatures to use Cookie() instead of Cookie for proper FastAPI dependency injection
  • Made tenant_id parameter optional with default value of None to handle missing cookies gracefully
  • Bumped package version from 1.3.0 to 1.3.1

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
sql_db_utils/session_management.py Updated synchronous get_db function signature for proper FastAPI cookie dependency injection
sql_db_utils/asyncio/session_management.py Updated asynchronous get_db function signature for proper FastAPI cookie dependency injection
sql_db_utils/version.py Version bump from 1.3.0 to 1.3.1

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@faizanazim11 faizanazim11 merged commit 14e3c00 into main Oct 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant