Skip to content

[WIP] Update on_event with lifespan event handler in docs#958

Closed
ppommer wants to merge 2 commits into
fastapi:mainfrom
ppommer:ppommer/lifespan-event
Closed

[WIP] Update on_event with lifespan event handler in docs#958
ppommer wants to merge 2 commits into
fastapi:mainfrom
ppommer:ppommer/lifespan-event

Conversation

@ppommer
Copy link
Copy Markdown

@ppommer ppommer commented May 31, 2024

Taking care of

DeprecationWarning: 
          on_event is deprecated, use lifespan event handlers instead.
  
          Read more about it in the
          [FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/).

in the FastAPI and Pydantic Tutorial.

Deprecation is noted here and here.


  • Update deprecated on_event with lifespan event
  • Update tutorial text
  • Update tutorial line numbers

@github-actions
Copy link
Copy Markdown
Contributor

📝 Docs preview for commit 79462c5 at: https://32aff99e.sqlmodel.pages.dev

@github-actions
Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot added the conflicts Automatically generated when a PR has a merge conflict label Dec 26, 2025
@tiangolo
Copy link
Copy Markdown
Member

Thanks for the interest and work on this! ☕

I want to implement a big refactor and some features in how to handle these things, I'm not fully happy with the existing interface.

I'll do that first, and then update the docs to reflect the recommended way to do things. I don't want to update the docs yet and suggest doing something that later I will suggest doing in a different way.

So for now, I will close this one. Thank you! 🍰

@tiangolo tiangolo closed this May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts Automatically generated when a PR has a merge conflict docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants