Skip to content

build(test-plain-python-missing-stack-frames): Migrate to uv and pyproject.toml#43

Merged
ericapisani merged 1 commit into
mainfrom
PY-2470-test-plain-python-missing-stack-frames
May 21, 2026
Merged

build(test-plain-python-missing-stack-frames): Migrate to uv and pyproject.toml#43
ericapisani merged 1 commit into
mainfrom
PY-2470-test-plain-python-missing-stack-frames

Conversation

@ericapisani

Copy link
Copy Markdown
Member

Summary

  • Replace pip/requirements.txt with uv/pyproject.toml
  • Update run.sh to use uv run
  • Remove legacy requirements.txt

Refs PY-2470

🤖 Generated with Claude Code

…oject.toml

Replace pip/requirements.txt with uv/pyproject.toml for dependency management. Update run.sh to use uv run.

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

linear-code Bot commented May 21, 2026

Copy link
Copy Markdown

PY-2470

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

python main.py No newline at end of file
uv run python main.py

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 script uses uv immediately after installation, but the installer doesn't update the PATH for the current shell session, causing a 'command not found' error.
Severity: HIGH

Suggested Fix

After installing uv, either add its installation directory (e.g., ~/.local/bin) to the PATH for the current session (e.g., export PATH="$HOME/.local/bin:$PATH") or invoke the binary using its absolute path. This ensures the command can be found within the same script execution.

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-plain-python-missing-stack-frames/run.sh#L5-L9

Potential issue: The script installs `uv` via a piped shell command. The installer
modifies shell profile files (e.g., `.bashrc`) to add the `uv` binary's directory to the
system `PATH`. However, these changes do not affect the `PATH` of the currently running,
non-interactive shell script. As a result, the subsequent call to `uv run python
main.py` will fail with a 'command not found' error because the shell's `PATH`
environment variable has not been updated. This causes the script to fail in any
environment where `uv` is not pre-installed.

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

@ericapisani ericapisani merged commit 6ce1d68 into main May 21, 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