build(test-django-rest-framework-streaming): Migrate to uv and pyproject.toml#17
Merged
Merged
Conversation
…ect.toml Replace pip/requirements.txt with uv/pyproject.toml for dependency management. Update run.sh to use uv run instead of manual venv creation and pip install. Refs PY-2444 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| [project] | ||
| name = "test-django-rest-framework-streaming" | ||
| version = "0" | ||
| requires-python = ">=3.12" |
There was a problem hiding this comment.
Bug: The pyproject.toml requires Python >=3.12, but the .python-version file is pinned to 3.11. This conflict will cause uv to fail, preventing the app from starting.
Severity: CRITICAL
Suggested Fix
Align the Python version requirements. Either update the .python-version file to a version that satisfies >=3.12 (e.g., 3.12), or adjust the requires-python constraint in pyproject.toml to ">=3.11" to match the existing environment.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: test-django-rest-framework-streaming/pyproject.toml#L4
Potential issue: The `pyproject.toml` file specifies `requires-python = ">=3.12"`, while
the existing `.python-version` file in the same directory pins the Python version to
`3.11`. When the `run.sh` script executes `uv run gunicorn mysite.wsgi:application`, the
`uv` tool will detect this version incompatibility and exit with an error. Because
`run.sh` is configured with `set -euo pipefail`, the script will terminate immediately
upon this error, preventing the Gunicorn server from ever launching and the application
from starting.
Did we get this right? 👍 / 👎 to inform future reviews.
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
pip/requirements.txtwithuv/pyproject.tomlfor dependency managementrun.shto useuv runinstead of manual venv creation and pip installrequirements.txtRefs PY-2444
Test plan
pyproject.tomlincludes all dependencies from the originalrequirements.txtrun.shusesuv runrequirements.txtis removed🤖 Generated with Claude Code