Skip to content

build(test-asyncio-taskgroup): Migrate from pip to uv#61

Merged
ericapisani merged 1 commit into
mainfrom
PY-2430-test-asyncio-taskgroup
May 22, 2026
Merged

build(test-asyncio-taskgroup): Migrate from pip to uv#61
ericapisani merged 1 commit into
mainfrom
PY-2430-test-asyncio-taskgroup

Conversation

@ericapisani

Copy link
Copy Markdown
Member

Summary

  • Replace requirements.txt with pyproject.toml for dependency management
  • Update run.sh to use uv run instead of manual venv/pip workflow
  • Part of PY-2428 migration effort

Test plan

  • Run ./run.sh and verify the FastAPI app starts on port 5000

🤖 Generated with Claude Code

Replace requirements.txt with pyproject.toml and update run.sh to use
uv for dependency management and script execution.

Refs PY-2430
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@linear-code

linear-code Bot commented May 22, 2026

Copy link
Copy Markdown

PY-2430

PY-2428

Comment on lines +4 to 7
if ! command -v uv &> /dev/null; then
curl -LsSf https://astral.sh/uv/install.sh | sh
fi

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.

[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.

@ericapisani ericapisani merged commit 012726a into main May 22, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant