fix: downgrade FastAPI and PySpark for Python 3.9 compatibility#3
Merged
mail2ghuman merged 1 commit intomainfrom Apr 9, 2026
Merged
Conversation
FastAPI 0.129+ requires Python >=3.10, and PySpark 4.1+ requires Python >=3.10. Pin FastAPI to >=0.115.0,<0.129.0 and PySpark to >=4.0.0,<4.1.0 to support Python 3.9 (macOS built-in version). Co-Authored-By: Harmit Singh <harmit.x.singh@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
2 tasks
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.
Summary
The
pyproject.tomldeclarespython = "^3.9"but the previous dependency constraints pulled in versions that dropped Python 3.9 support:This caused
poetry lock/poetry installto fail on macOS with the built-in Python 3.9.6.Fix: Pin upper bounds so Poetry resolves to compatible versions:
fastapi[standard]:^0.135.3→>=0.115.0,<0.129.0(resolves to 0.128.8)pyspark:^4.1.1→>=4.0.0,<4.1.0(resolves to 4.0.2)The lock file is regenerated accordingly (transitive deps like
anyio,click,starlette,websocketsalso shift to Python 3.9-compatible versions).Review & Testing Checklist for Human
poetry install && poetry run fastapi dev app/main.py) and confirm it starts and serves queriesopenai ^2.31.0resolves correctly under Python 3.9 — this constraint was not changed but should be verified duringpoetry installpoetry lock && poetry install && poetry run fastapi dev app/main.py, then open the frontend and submit a test queryNotes
^0.135.3/^4.1.1.Link to Devin session: https://app.devin.ai/sessions/cd4107aa709a4fa4a7fae1ae2d63f039
Requested by: @mail2ghuman