FIX: Move .python-version to backend directory#60
Conversation
Move the .python-version file from root to backend/ so that uv correctly detects Python 3.11 when running uv sync from backend/. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
| Filename | Overview |
|---|---|
| backend/.python-version | .python-version file (content: 3.11) moved from repo root to backend/ — correct fix so uv detects Python 3.11 when running uv sync from the backend/ directory where pyproject.toml lives. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Developer runs: uv sync] --> B{Working directory?}
B -- "backend/" --> C[uv searches for .python-version\nrelative to pyproject.toml]
C -- "Before PR\n(.python-version at repo root)" --> D["uv cannot find .python-version\n→ uses default Python"]
C -- "After PR\n(.python-version at backend/)" --> E["uv finds backend/.python-version\n→ uses Python 3.11 ✓"]
D --> F["Wrong Python version used\n(potential env mismatch)"]
E --> G["Correct Python 3.11 venv created"]
Reviews (1): Last reviewed commit: "FIX: Move .python-version to backend dir..." | Re-trigger Greptile
What
.python-versionfile from the root directory to thebackend/directoryWhy
uv syncfrom thebackend/directory,uvwas not detecting the correct Python version (3.11)uvlooks for.python-versionrelative to the project root (wherepyproject.tomlis located)pyproject.tomlis inbackend/, the.python-versionfile in the root was not being useduvto potentially use a different Python version than intendedHow
.python-versionfromvisitran/(root) tovisitran/backend/pyproject.toml, ensuringuvcorrectly detects Python 3.11Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
uv syncwill now correctly use Python 3.11 when run from thebackend/directoryDatabase Migrations
Env Config
Relevant Docs
Related Issues or PRs
uv syncfrombackend/Dependencies Versions
Notes on Testing
Testing Checklist:
uv syncfrombackend/directory and verify Python 3.11 is usedHow to Test:
backend/directoryuv sync.venv/bin/python --versionshows 3.11.xScreenshots
NA
Checklist
I have read and understood the Contribution Guidelines.