From 65975b42149d120acece39c92335c19db3532f13 Mon Sep 17 00:00:00 2001 From: Erica Pisani Date: Thu, 21 May 2026 16:25:25 -0400 Subject: [PATCH] build(test-flask-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-2455 Co-Authored-By: Claude Opus 4.6 --- test-flask-streaming-response/pyproject.toml | 16 +++++++++++++++ .../requirements.txt | 10 ---------- test-flask-streaming-response/run.sh | 20 +++++-------------- 3 files changed, 21 insertions(+), 25 deletions(-) create mode 100644 test-flask-streaming-response/pyproject.toml delete mode 100644 test-flask-streaming-response/requirements.txt diff --git a/test-flask-streaming-response/pyproject.toml b/test-flask-streaming-response/pyproject.toml new file mode 100644 index 0000000..edc354d --- /dev/null +++ b/test-flask-streaming-response/pyproject.toml @@ -0,0 +1,16 @@ +[project] +name = "test-flask-streaming-response" +version = "0" +requires-python = ">=3.12" + +dependencies = [ + "blinker>=1.9.0", + "flask>=3.1.1", + "gunicorn>=23.0.0", + "ipdb>=0.13.13", + "markupsafe>=3.0.2", + "sentry-sdk[flask]", +] + +[tool.uv.sources] +sentry-sdk = { path = "../../sentry-python", editable = true } diff --git a/test-flask-streaming-response/requirements.txt b/test-flask-streaming-response/requirements.txt deleted file mode 100644 index f06255d..0000000 --- a/test-flask-streaming-response/requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ - -flask -blinker -markupsafe - -gunicorn - --e ../../code/sentry-python - -ipdb \ No newline at end of file diff --git a/test-flask-streaming-response/run.sh b/test-flask-streaming-response/run.sh index 5a7f89e..1e02273 100755 --- a/test-flask-streaming-response/run.sh +++ b/test-flask-streaming-response/run.sh @@ -1,18 +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 - - -# Run Flask application on localhost:5000 -flask --app main run - -# Run Flask application with multithreading (port 8000) -# gunicorn main:app -w 1 --threads 12 \ No newline at end of file +uv run flask --app main run