Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions test-asyncio-taskgroup/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[project]
name = "test-asyncio-taskgroup"
version = "0"
requires-python = ">=3.12"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The Python version in .python-version (3.11.11) conflicts with the requires-python = ">=3.12" constraint in pyproject.toml, causing uv run to fail.
Severity: HIGH

Suggested Fix

Align the Python versions. Either update the .python-version file to a version that satisfies >=3.12 (e.g., 3.12.0), or adjust the requires-python constraint in pyproject.toml to include 3.11.11.

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-asyncio-taskgroup/pyproject.toml#L4

Potential issue: The project configuration contains a Python version conflict. The
`.python-version` file pins the version to `3.11.11`, while the `pyproject.toml` file
specifies a requirement of `requires-python = ">=3.12"`. When `uv run` is executed, it
will respect the `.python-version` file, attempt to use Python 3.11.11, and then fail
with an incompatibility error because this version does not satisfy the `>=3.12`
constraint defined in `pyproject.toml`.

Did we get this right? 👍 / 👎 to inform future reviews.


dependencies = [
"aiohttp>=3.11.14",
"fastapi==0.110.0",
"ipdb>=0.13.13",
"opentelemetry-distro>=0.50b0",
"opentelemetry-instrumentation-fastapi>=0.50b0",
"starlette==0.36.3",
"uvicorn>=0.34.0",
"sentry-sdk[fastapi]",
]

[tool.uv.sources]
sentry-sdk = { path = "../../sentry-python", editable = true }
11 changes: 0 additions & 11 deletions test-asyncio-taskgroup/requirements.txt

This file was deleted.

9 changes: 4 additions & 5 deletions test-asyncio-taskgroup/run.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail

python -m venv .venv
source .venv/bin/activate
if ! command -v uv &> /dev/null; then
curl -LsSf https://astral.sh/uv/install.sh | sh
fi

Comment on lines +4 to 7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The run.sh script installs uv but doesn't update the current shell's PATH, causing the subsequent uv run command to fail with 'command not found'.
Severity: HIGH

Suggested Fix

After the uv installation line, add a command to update the PATH for the current session. For example, add export PATH="$HOME/.cargo/bin:$PATH" or source the appropriate shell configuration file.

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-asyncio-taskgroup/run.sh#L4-L7

Potential issue: The `run.sh` script installs `uv` via a curl pipe to `sh`. However, the
installer only modifies shell configuration files (like `.bashrc`) for future sessions
and does not update the `PATH` for the current, non-interactive shell session.
Consequently, the immediately following command, `uv run uvicorn main:app`, will fail
with a 'command not found' error on any system where `uv` is not already installed and
in the `PATH`.

Did we get this right? 👍 / 👎 to inform future reviews.

pip install -r requirements.txt

uvicorn main:app --port 5000 --reload
uv run uvicorn main:app --port 5000 --reload
Loading