Repository navigation
chore(deps): SQLAlchemy 2.1.4 with the asyncio extra - #21
Merged
Merged
Conversation
The <2.1 constraint existed because 2.1 had no wheels, then because 2.1 is a new minor. SQLModel 0.0.48 added 2.1 support, and 2.1 is the first SQLAlchemy with a Python 3.15 wheel, so 2.0 ran as pure Python since the move to 3.15. Declared as sqlalchemy[asyncio]: 2.1 installs greenlet only through that extra. The lock changes one version; greenlet stays at 3.5.6. Checked against the 2.1 migration guide: asyncpg is named in the URL (the psycopg default does not apply), no named types, unconditional autoflush is harmless here. Full suite passes on 3.15 with SADeprecationWarning, SAWarning and SQLModel DeprecationWarnings as errors; lint, mypy and pip-audit clean. Removes the Known Issues entry about the pure wheel. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the Known Issue that #20 added: SQLAlchemy 2.0.x has no Python 3.15 wheel, so since the move to 3.15 it ran as pure Python. 2.1.4 ships a cp315 wheel and SQLModel 0.0.48 added 2.1 support.
Changes
pyproject.toml:sqlalchemy (>=2.0.54,<2.1)becomessqlalchemy[asyncio] (>=2.1.4,<3.0). The extra matters: in 2.1 greenlet, which the asyncio extension needs, is only installed through[asyncio]. The comment now says why the dependency is declared at all (direct imports indatabase.pyandservices/users.py, plus the extra).poetry.lock: one version changes, SQLAlchemy 2.0.54 to 2.1.4. greenlet 3.5.6 stays.AGENTS.mddrops the sentence about holding SQLAlchemy below 2.1.2.1 behaviour changes, checked against the migration guide
postgresql://URLs. Not applicable:config.pyandtests/conftest.pybuildpostgresql+asyncpg://URLs, and a test asserts the scheme.MetaData. Not applicable: the models have none.SELECT 1on a session that has no pending changes; the test cleanup uses its own session.Rowis typed withoutTuple. Not used: results go throughsession.exec(...).first().Verification, local on Python 3.15.0 with PostgreSQL 17
SADeprecationWarning,SAWarningand SQLModelDeprecationWarningturned into errors.🤖 Generated with Claude Code