fix: pin fasthtml streaming examples#750
Open
JamBalaya56562 wants to merge 1 commit into
Open
Conversation
…n CI python-fasthtml==0.5.1 fails to import on python:3.12-slim (ModuleNotFoundError: sqlite_minutils). Bump both response-streaming examples to 0.13.4; the image example also needs anthropic 0.40.0 because fasthtml 0.13.4 pulls httpx>=0.28 which dropped the 'proxies' kwarg that anthropic 0.34.1 passes. Add a test-stream CI job that builds and runs each app (these use Lambda Function URL RESPONSE_STREAM, which sam local start-api can't drive). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
python-fasthtml==0.5.1fails to import onpython:3.12-slimwithModuleNotFoundError: sqlite_minutils, which broke both response-streaming examples at runtime. Because these examples use a Lambda Function URL withRESPONSE_STREAMand have no API Gateway events,sam local start-api(used by the existingtest-image/test-zipjobs) cannot drive them — so they were only lint-validated and the broken pin shipped undetected.This PR pins the examples to working versions and adds CI coverage that actually builds and runs them.
Changes
python-fasthtmlto0.13.4in bothfasthtml-response-streamingandfasthtml-response-streaming-zipexamples.anthropicto0.40.0in the image example. fasthtml0.13.4pullshttpx>=0.28, which dropped theproxieskwarg thatanthropic 0.34.1still passes, causing aTypeErrorat client construction.test-streamCI job to.github/workflows/examples.yamlthat builds and runs each streaming app, then verifies it responds over HTTP:COPYs the locally built adapter image) and runs it, mapping the container's8080to host8000.AWS_REGIONis set soAnthropicBedrock()can construct without real credentials;GET /only renders a form and never calls Bedrock.requirements.txtand runsapp/main.pydirectly (the layer paths added byrun.share only needed at runtime on Lambda)./for up to 90s and asserts a non-5xx HTTP status, dumping app/container logs on failure.Testing
test-streamruns both examples in a matrix (fail-fast: false) and confirms each app starts and serves a valid response.Why this matters
Without an end-to-end run, the broken
python-fasthtmlpin passed lint validation and shipped. This job closes that gap for theRESPONSE_STREAMexamples thatsam local start-apicannot exercise.