Skip to content

fix: pin SQLAlchemy>=2.0 in requirements.txt (CORE-63)#13316

Open
octo-patch wants to merge 1 commit intoComfy-Org:masterfrom
octo-patch:fix/issue-13036-sqlalchemy-version-requirement
Open

fix: pin SQLAlchemy>=2.0 in requirements.txt (CORE-63)#13316
octo-patch wants to merge 1 commit intoComfy-Org:masterfrom
octo-patch:fix/issue-13036-sqlalchemy-version-requirement

Conversation

@octo-patch
Copy link
Copy Markdown

Fixes #13036

Problem

ComfyUI uses SQLAlchemy 2.0-only APIs (DeclarativeBase, mapped_column, Mapped) in app/database/models.py and app/assets/database/models.py. Without a minimum version constraint, pip can resolve SQLAlchemy 1.x, causing an ImportError that crashes startup before any try/except can intercept it.

Solution

Pin SQLAlchemy>=2.0 in requirements.txt to ensure pip installs a compatible version.

Testing

Verified that both app/database/models.py and app/assets/database/models.py use SQLAlchemy 2.0-only APIs (DeclarativeBase, mapped_column, Mapped), and the constraint aligns with what the codebase already requires implicitly.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 2026

📝 Walkthrough

Walkthrough

The pull request updates the requirements.txt file to enforce a minimum version constraint on the SQLAlchemy dependency. Previously unconstrained, SQLAlchemy is now specified as SQLAlchemy>=2.0, requiring at least major version 2.0. This change affects only the SQLAlchemy dependency specification; all other package entries and their constraints remain unchanged.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description is well-detailed and directly related to the changeset, explaining the problem, solution, and testing verification.
Linked Issues check ✅ Passed The PR directly addresses issue #13036 by implementing the pinning solution to ensure SQLAlchemy>=2.0 is installed, meeting all coding requirements.
Out of Scope Changes check ✅ Passed The PR contains only the necessary dependency constraint update; all changes are in-scope and directly address the linked issue requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title 'fix: pin SQLAlchemy>=2.0 in requirements.txt (CORE-63)' directly and clearly describes the main change: updating the SQLAlchemy dependency constraint to >=2.0 in requirements.txt to fix a compatibility issue.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@alexisrolland alexisrolland changed the title fix: pin SQLAlchemy>=2.0 in requirements.txt fix: pin SQLAlchemy>=2.0 in requirements.txt (CORE-63) Apr 16, 2026
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.

SQLAlchemy 2.0 dependency (mapped_column, DeclarativeBase) breaks existing installs

1 participant