fix: Replace deprecated @app.route with app.add_route for Starlette 1.0 compatibility#279
Open
raynercodes wants to merge 4 commits into
Open
fix: Replace deprecated @app.route with app.add_route for Starlette 1.0 compatibility#279raynercodes wants to merge 4 commits into
raynercodes wants to merge 4 commits into
Conversation
dotlambda
reviewed
Jun 11, 2026
Update to examples.md to mirror project handler names Co-authored-by: dotlambda <github@dotlambda.de>
raynercodes
commented
Jun 12, 2026
raynercodes
left a comment
Author
There was a problem hiding this comment.
Thanks for the review — applied the suggestion.
|
You overlooked the other spots where you made the same mistake. |
Author
|
I Fixed all remaining instances. I updated handler to the correct function names throughout your examples.md. |
|
Hey @raynercodes any news on this one ? :) |
Author
Sorry for the late response I kept forgetting to message you back but I actually haven't heard back from the author he never did merge the PR |
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.
Fixes #271
Problem
Starlette 1.0 removed the
@app.route()decorator. Tests and documentation examples using this pattern throw:AttributeError: 'Starlette' object has no attribute 'route'
Changes
tests/test_starlette_extension.pyto useapp.add_route()instead of@app.route()decoratordocs/examples.mdto reflect the new routing patternTesting
Before this fix: 12 tests failing with AttributeError
After this fix: 6 tests failing (pre-existing timestamp precision issue unrelated to this PR)
All previously passing tests continue to pass still.