Skip to content

Relax sqlalchemy version pin and add pre-release test workflow#1884

Open
mscheltienne wants to merge 2 commits intofastapi:mainfrom
mscheltienne:rm_pin
Open

Relax sqlalchemy version pin and add pre-release test workflow#1884
mscheltienne wants to merge 2 commits intofastapi:mainfrom
mscheltienne:rm_pin

Conversation

@mscheltienne
Copy link
Copy Markdown

At my company, we are driving towards compatibility with python 3.14t free-threaded. While investigating the remaining changes necessary, we noticed that:

  • Our CIs are happy with sqlalchemy version 2.1.0b2 + sqlmodel 0.0.38 (everything pass, we test mainly DB operations with postgres using psycopg[c] against local dockerized DB and against actual AWS DB).
  • The test environment was tricky to build because sqlmodel 0.0.38 (and other versions) have a very conservative "SQLAlchemy >=2.0.14,<2.1.0" constraint, preventing the installation of 2.1.0b2 by default.
  • As far as I could tell, sqlmodel seems compatible with SQLAlchemy 2.1.0+

This PR thus proposes 2 changes:

  1. Relax the constraint to <2.2.0, offering support for the new SQLAlchemy version soon-to-be-released and by extension to free-threaded python.
  2. Add a test job which runs against the latest release of sqlalchemy, including pre-release versions.

@mscheltienne
Copy link
Copy Markdown
Author

mscheltienne commented Apr 23, 2026

Should I run uv lock --upgrade? What is your workflow here? For now I ran it without the --upgrade flag.

@github-actions
Copy link
Copy Markdown
Contributor

📝 Docs preview

Last commit 175f9db at: https://6588ea3c.sqlmodel.pages.dev

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