From 6493af98c7e0fc7a2ef31bed70176aba110076c1 Mon Sep 17 00:00:00 2001 From: Erica Pisani Date: Thu, 21 May 2026 16:23:53 -0400 Subject: [PATCH] build(test-fastapi-streaming-response): Migrate to uv and pyproject.toml Replace pip/requirements.txt with uv/pyproject.toml for dependency management. Update run.sh to use uv run instead of manual venv creation and pip install. Refs PY-2452 Co-Authored-By: Claude Opus 4.6 --- test-fastapi-streaming-response/pyproject.toml | 16 ++++++++++++++++ test-fastapi-streaming-response/requirements.txt | 10 ---------- test-fastapi-streaming-response/run.sh | 11 ++++------- 3 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 test-fastapi-streaming-response/pyproject.toml delete mode 100644 test-fastapi-streaming-response/requirements.txt diff --git a/test-fastapi-streaming-response/pyproject.toml b/test-fastapi-streaming-response/pyproject.toml new file mode 100644 index 0000000..98039ff --- /dev/null +++ b/test-fastapi-streaming-response/pyproject.toml @@ -0,0 +1,16 @@ +[project] +name = "test-fastapi-streaming-response" +version = "0" +requires-python = ">=3.12" + +dependencies = [ + "black>=25.1.0", + "fastapi>=0.115.11", + "ipdb>=0.13.13", + "requests>=2.32.3", + "sentry-sdk[fastapi]", + "uvicorn>=0.34.0", +] + +[tool.uv.sources] +sentry-sdk = { path = "../../sentry-python", editable = true } diff --git a/test-fastapi-streaming-response/requirements.txt b/test-fastapi-streaming-response/requirements.txt deleted file mode 100644 index c571613..0000000 --- a/test-fastapi-streaming-response/requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ -fastapi -uvicorn - -requests -black -ipdb - -# Sentry --e ../../../code/sentry-python/ # local dev version of sentry python sdk. -# sentry-sdk==1.11.0 # production version of sentry python sdk from PyPI. diff --git a/test-fastapi-streaming-response/run.sh b/test-fastapi-streaming-response/run.sh index 2527268..6460224 100755 --- a/test-fastapi-streaming-response/run.sh +++ b/test-fastapi-streaming-response/run.sh @@ -1,12 +1,9 @@ #!/usr/bin/env bash - set -euo pipefail - reset -python -m venv .venv -source .venv/bin/activate - -pip install -r requirements.txt +if ! command -v uv &> /dev/null; then + curl -LsSf https://astral.sh/uv/install.sh | sh +fi -uvicorn main:app --port 5000 --reload +uv run uvicorn main:app --port 5000 --reload