Skip to content

Conversation

@Michele0303
Copy link

This updates the FastAPI tutorial examples to use the modern FastAPI lifespan API instead of the deprecated startup event.

The on_startup() function is intentionally kept as a plain helper and reused by the lifespan context manager, so that existing tutorial tests can continue to call it directly without relying on the ASGI lifecycle.

No behavioral changes are introduced, and all tests pass.

@github-actions github-actions bot added the docs Improvements or additions to documentation label Dec 23, 2025
@Michele0303 Michele0303 force-pushed the docs-fastapi-lifespan branch from 6f21524 to 19fbf35 Compare December 23, 2025 00:16
Replace deprecated FastAPI startup events in tutorial examples
with lifespan context managers, keeping on_startup() as a helper
for tests and documentation consistency.
@Michele0303 Michele0303 force-pushed the docs-fastapi-lifespan branch 2 times, most recently from 20ada51 to 8cb44ee Compare December 23, 2025 00:17
@github-actions github-actions bot added the conflicts Automatically generated when a PR has a merge conflict label Dec 23, 2025
@github-actions
Copy link
Contributor

This pull request has a merge conflict that needs to be resolved.

@Michele0303 Michele0303 force-pushed the docs-fastapi-lifespan branch from 8cb44ee to 20ada51 Compare December 23, 2025 00:19
@github-actions github-actions bot removed the conflicts Automatically generated when a PR has a merge conflict label Dec 23, 2025
@Michele0303
Copy link
Author

Closing this PR and reopening a clean one with the same changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant