Fix TLS redirect doc example to use startup()#3155
Open
ChihweiLHBird wants to merge 1 commit into
Open
Conversation
…`/`finalize` Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3155 +/- ##
=============================================
- Coverage 87.793% 87.731% -0.062%
=============================================
Files 105 105
Lines 8143 8143
Branches 1290 1290
=============================================
- Hits 7149 7144 -5
- Misses 687 692 +5
Partials 307 307 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
startup() instead of manual `signalize…startup()
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.
Replace manual
app.signalize(),app.finalize(), andapp.state.is_started = Truewithawait app_server.startup()in the HTTP-to-HTTPS redirect documentationThe
create_serverdocstring explicitly recommends usingawait app_server.startup()for app initialization. The manualsignalize()/finalize()approach skips steps that_startup()performs — extension setup, route duplicate checking, uvloop conflict detection, and touchup optimizations. While the manual approach works for trivial cases,startup()is the correct API and safer to recommend in docs where users may adapt the pattern for more complex apps.Resolves #2832 (remaining work after #2864)