From 8ca2fdd7661d4a386c3e9545e384db1631cfe493 Mon Sep 17 00:00:00 2001 From: Erica Pisani Date: Thu, 21 May 2026 16:33:15 -0400 Subject: [PATCH] build(test-python312): Migrate to uv and pyproject.toml Replace pip/requirements.txt with uv/pyproject.toml for dependency management. Update run.sh and run-sanic.sh to use uv run. Refs PY-2471 Co-Authored-By: Claude Opus 4.6 --- test-python312/pyproject.toml | 13 +++++++++++++ test-python312/requirements.txt | 5 ----- test-python312/run-sanic.sh | 16 +++++----------- test-python312/run.sh | 16 +++++----------- 4 files changed, 23 insertions(+), 27 deletions(-) create mode 100644 test-python312/pyproject.toml delete mode 100644 test-python312/requirements.txt diff --git a/test-python312/pyproject.toml b/test-python312/pyproject.toml new file mode 100644 index 0000000..0852889 --- /dev/null +++ b/test-python312/pyproject.toml @@ -0,0 +1,13 @@ +[project] +name = "test-python312" +version = "0" +requires-python = ">=3.12" + +dependencies = [ + "ipdb>=0.13.13", + "sanic>=24.12.0", + "sentry-sdk[sanic]", +] + +[tool.uv.sources] +sentry-sdk = { path = "../../sentry-python", editable = true } diff --git a/test-python312/requirements.txt b/test-python312/requirements.txt deleted file mode 100644 index 51cd1e2..0000000 --- a/test-python312/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -sanic - -ipdb - --e ../../../code/sentry-python \ No newline at end of file diff --git a/test-python312/run-sanic.sh b/test-python312/run-sanic.sh index 64ea642..c77df44 100755 --- a/test-python312/run-sanic.sh +++ b/test-python312/run-sanic.sh @@ -1,14 +1,8 @@ #!/usr/bin/env bash +set -euo pipefail -# exit on first error -set -xe +if ! command -v uv &> /dev/null; then + curl -LsSf https://astral.sh/uv/install.sh | sh +fi -# create and activate virtual environment -python -m venv .venv -source .venv/bin/activate - -# Install (or update) requirements -python -m pip install -r requirements.txt - - -sanic server \ No newline at end of file +uv run sanic server diff --git a/test-python312/run.sh b/test-python312/run.sh index eaffb59..f283b88 100755 --- a/test-python312/run.sh +++ b/test-python312/run.sh @@ -1,14 +1,8 @@ #!/usr/bin/env bash +set -euo pipefail -# exit on first error -set -xe +if ! command -v uv &> /dev/null; then + curl -LsSf https://astral.sh/uv/install.sh | sh +fi -# create and activate virtual environment -python -m venv .venv -source .venv/bin/activate - -# Install (or update) requirements -python -m pip install -r requirements.txt - - -python main.py \ No newline at end of file +uv run python main.py