Skip to content

fix(examples): bump FastAPI and Flask pin sets together - #922

Merged
bnusunny merged 4 commits into
mainfrom
fix/pip-pin-pairs
Nov 17, 2026
Merged

bnusunny merged 4 commits into
mainfrom
fix/pip-pin-pairs

Conversation

@bnusunny

Copy link
Copy Markdown
Contributor

Dependabot bumped single pins in these fully pinned requirements.txt files, which breaks the install: starlette 1.3.1 against fastapi 0.115.5 (needs starlette<0.42), and Flask 3.1.3 against blinker 1.6.2 (needs >=1.9). This PR bumps each set as a whole, to versions at or above every open alert's patched version:

  • fastapi, fastapi-zip, fastapi-background-tasks: fastapi 0.141.1 (the newest release before it added an opentelemetry-api dependency), starlette 1.10.0, anyio 4.16.0, idna 3.20, pydantic 2.14.3 / pydantic-core 2.50.4, plus fastapi's new deps annotated-doc and typing-inspection. background-tasks also gets certifi 2026.10.23, requests 2.34.2 and urllib3 2.8.0.
  • flask-zip: Flask 3.1.3, Werkzeug 3.1.9, Jinja2 3.1.6, blinker 1.9.0, itsdangerous 2.2.0 (Flask 3.1 requires >=2.2).

Testing

On Python 3.12, with a fresh venv per example:

  • pip install -r requirements.txt succeeds and pip check reports no broken requirements, for all 4.
  • Importing each app and calling GET / in-process returns 200 with the message body the example matrix expects.

All four examples are in the build matrix, so CI boots them on this PR.

Supersedes

Dependabot should close these once this merges.

Dependabot bumped single pins in these fully pinned requirements files,
which broke installs: starlette 1.3.1 against fastapi 0.115.5 (needs
starlette<0.42), and Flask 3.1.3 against blinker 1.6.2 (needs >=1.9).
Bump each set as a whole to versions that clear the open alerts:

- fastapi, fastapi-zip, fastapi-background-tasks: fastapi 0.141.1
  (newest release before the opentelemetry-api dependency), starlette
  1.10.0, anyio 4.16.0, idna 3.20, pydantic 2.14.3 / pydantic-core
  2.50.4, plus fastapi's new deps annotated-doc and typing-inspection.
  background-tasks also gets certifi 2026.10.23, requests 2.34.2 and
  urllib3 2.8.0.
- flask-zip: Flask 3.1.3, Werkzeug 3.1.9, Jinja2 3.1.6, blinker 1.9.0,
  itsdangerous 2.2.0 (Flask 3.1 requires >=2.2).

Supersedes #857, #860, #869 and #863.
@bnusunny
bnusunny requested a review from a team as a code owner November 13, 2026 00:54

@vicheey vicheey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for bundling these. Bumping each set as a whole looks right, and every open alert on these four files lands at or above its patched version.

A couple of follow-ups, none blocking:

  • examples/flask/app/requirements.txt has the same pins flask-zip had before this PR (Flask==3.1.3 with blinker==1.6.2 and itsdangerous==2.1.2), so it won't install either. Could it get the same blinker==1.9.0 / itsdangerous==2.2.0 bump here, so the two Flask examples stay in step?
  • Six more FastAPI examples on main pin fastapi==0.115.5 with starlette==1.3.1 (bedrock-agent-fastapi(-zip), fastapi-response-streaming(-zip), fastapi-snapstart(-zip)), and fastapi-backend-only-response-streaming has botocore==1.31.61 with urllib3==2.8.0. None of them are in the example matrix, which is how those bumps merged. Happy for that to be a separate PR.
  • Optional: a pip install --dry-run -r step for changed examples/**/requirements.txt in Verify Examples would catch this kind of single-pin bump for examples outside the matrix.
  • Nit (optional): sniffio is no longer needed by anyio 4.16, so it could come out of the three FastAPI files.

Flask 3.1.3 needs blinker>=1.9 and itsdangerous>=2.2; match flask-zip.
anyio 4.16 no longer depends on sniffio, so drop it from the FastAPI
examples touched by this PR.
@bnusunny

Copy link
Copy Markdown
Contributor Author

Thanks for the careful review!

1 and 4: pushed to this PR. examples/flask now uses blinker 1.9.0 / itsdangerous 2.2.0, and sniffio is removed from the three FastAPI files. I checked anyio 4.16.0's metadata first, and nothing else in those files depends on sniffio.
2: #930. All six FastAPI examples plus fastapi-backend-only-response-streaming now use the same set as this PR. The backend-only one also had fastapi 0.109.2 with starlette 1.3.1. botocore/boto3 go to 1.35.63 so urllib3 stays at 2.8.0.
3: #931. Verify Examples now runs pip install --dry-run on changed examples/**/requirements.txt, with each example's Python version.

@bnusunny
bnusunny requested a review from vicheey November 14, 2026 00:21

@vicheey vicheey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update the branch. Overall looks good. Thanks!

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.

2 participants