Skip to content

build(test-queues-module-manual): Migrate to uv and pyproject.toml#45

Merged
ericapisani merged 2 commits into
mainfrom
PY-2472-test-queues-module-manual
May 21, 2026
Merged

build(test-queues-module-manual): Migrate to uv and pyproject.toml#45
ericapisani merged 2 commits into
mainfrom
PY-2472-test-queues-module-manual

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-2472

🤖 Generated with Claude Code

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

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

linear-code Bot commented May 21, 2026

Copy link
Copy Markdown

PY-2472

[project]
name = "test-queues-module-manual"
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 pyproject.toml file's requires-python constraint (>=3.12) conflicts with the pinned version in .python-version (3.10.4), causing uv run to fail.
Severity: HIGH

Suggested Fix

Align the Python version requirements. Either update the .python-version file to a version that satisfies >=3.12, or change the requires-python setting in pyproject.toml to ">=3.10.4" to match the pinned version.

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-queues-module-manual/pyproject.toml#L4

Potential issue: The `pyproject.toml` file specifies `requires-python = ">=3.12"`, but
the project's `.python-version` file pins the Python interpreter to `3.10.4`. The `uv`
tool, used in `run.sh`, enforces that the environment's interpreter version satisfies
the `requires-python` constraint. When `uv run` is executed, it detects this version
mismatch and aborts with an incompatibility error, preventing the test script from
running.

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

@ericapisani ericapisani merged commit 42d8bdf into main May 21, 2026
9 checks passed
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 installs uv but fails to update the PATH in the current session, causing the subsequent uv command to fail.
Severity: HIGH

Suggested Fix

Explicitly update the PATH variable within the script after the installation step (e.g., export PATH="$HOME/.local/bin:$PATH") or invoke the uv binary using its absolute path.

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-queues-module-manual/run.sh#L5-L9

Potential issue: The `run.sh` script attempts to install `uv` if it is not found.
However, the installation process modifies shell configuration files for future sessions
but does not update the `PATH` environment variable for the current, executing shell.
Because the script uses `set -e`, the subsequent call to `uv run python main.py` fails
with a "command not found" error, causing the script to exit. This will occur in any
environment that does not already have `uv` installed and in the `PATH`.

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