Conversation
- Update requires-python constraint from ">=3.10,<3.11.1" to ">=3.10,<3.13" - Pin Python 3.11 via .python-version for consistent dev/CI environments - Update CI backend tests workflow to use Python 3.11 - Update uv.lock for new Python version range Resolves the google.api_core FutureWarning about Python 3.10 reaching EOL in Oct 2026. Tested: all deps install, Django boots (dev + prod), no new test failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
| Filename | Overview |
|---|---|
| .github/workflows/core-backend-tests.yaml | Matrix python-version updated from "3.10" to "3.11" — consistent with the new .python-version pin and pyproject.toml constraint. |
| .python-version | New file pinning the dev environment to Python 3.11 for uv and pyenv-compatible tooling. |
| backend/pyproject.toml | requires-python widened from >=3.10,<3.11.1 to >=3.10,<3.13; change is intentional and the lock file was regenerated accordingly. |
| backend/uv.lock | Lock file regenerated with revision=3 and the updated Python range; resolution markers now split on 3.11.* / >=3.12 / <3.11, which is correct for the new range. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Developer Workstation] -->|.python-version| B[Python 3.11 ✅]
C[GitHub Actions CI] -->|core-backend-tests.yaml matrix| D[Python 3.11 ✅]
E[uv lock resolution] -->|backend/pyproject.toml requires-python| F[>=3.10,<3.13 ✅]
G[Docker Production Image] -->|backend.Dockerfile FROM| H[Python 3.10.14 ⚠️]
I[Pre-commit Hooks] -->|.pre-commit-config.yaml default_language_version| J[python3.10 ⚠️]
K[SonarCloud Analysis] -->|sonar-project.properties| L[sonar.python.version=3.10 ⚠️]
Comments Outside Diff (1)
-
docker/dockerfiles/backend.Dockerfile, line 1 (link)Dockerfile still pins Python 3.10 after the upgrade
The production Docker image still uses
python:3.10.14-slim, so containerized deployments will run Python 3.10 while.python-version, CI, andpyproject.tomlall target 3.11. Any behavior differences between 3.10 and 3.11 (e.g.google.api_corewarnings, exception group handling,tomllibstdlib availability) will be invisible in dev/CI but live in production containers.Prompt To Fix With AI
This is a comment left during a code review. Path: docker/dockerfiles/backend.Dockerfile Line: 1 Comment: **Dockerfile still pins Python 3.10 after the upgrade** The production Docker image still uses `python:3.10.14-slim`, so containerized deployments will run Python 3.10 while `.python-version`, CI, and `pyproject.toml` all target 3.11. Any behavior differences between 3.10 and 3.11 (e.g. `google.api_core` warnings, exception group handling, `tomllib` stdlib availability) will be invisible in dev/CI but live in production containers. How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: docker/dockerfiles/backend.Dockerfile
Line: 1
Comment:
**Dockerfile still pins Python 3.10 after the upgrade**
The production Docker image still uses `python:3.10.14-slim`, so containerized deployments will run Python 3.10 while `.python-version`, CI, and `pyproject.toml` all target 3.11. Any behavior differences between 3.10 and 3.11 (e.g. `google.api_core` warnings, exception group handling, `tomllib` stdlib availability) will be invisible in dev/CI but live in production containers.
```suggestion
FROM python:3.11-slim
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: .pre-commit-config.yaml
Line: 25
Comment:
**Pre-commit default Python version not updated**
`default_language_version` still forces hooks to run under `python3.10`, even though the repo now targets 3.11. This means linters/formatters (black, mypy, etc.) run under a different interpreter than the codebase, which can produce slightly different results or mask 3.11-specific type errors.
```suggestion
python: python3.11
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: sonar-project.properties
Line: 3
Comment:
**SonarCloud Python version not updated**
`sonar.python.version=3.10` tells SonarCloud to analyse the code under Python 3.10 semantics. After the upgrade, this should point to 3.11 so static-analysis rules and coverage reporting reflect the actual runtime.
```suggestion
sonar.python.version=3.11
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (2): Last reviewed commit: "fix: move .python-version to repo root" | Re-trigger Greptile
Tools like pyenv and uv look for .python-version from the working directory upward. It belongs at the repo root, not inside backend/. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
What
>=3.10,<3.11.1to>=3.10,<3.13.python-versionfile to pin Python 3.11uv.lockfor new Python version rangeWhy
Python 3.10 reaches EOL Oct 2026.
google.api_corealready emits aFutureWarningand will stop supporting 3.10 after that date. The original<3.11.1constraint was set in the initial commit with no documented incompatibility.How
requires-pythoninpyproject.toml.python-versionat repo root (read by pyenv, uv, IDEs)3.10to3.11uv.lockto reflect new version rangeCan 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)
Low risk. Tested thoroughly:
Database Migrations
None
Env Config
Developers need Python 3.11 installed locally.
python3.11is available via pyenv or system package managers.Relevant Docs
Related Issues or PRs
Dependencies Versions
No dependency version changes — only the Python version constraint was widened.
Notes on Testing
Checklist
I have read and understood the Contribution Guidelines.
🤖 Generated with Claude Code