Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: replace FastAPI lifecycle management to use the new lifespan context manager #998

Open
1 task done
xiaobo8204 opened this issue Feb 16, 2025 · 2 comments
Open
1 task done
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@xiaobo8204
Copy link
Contributor

xiaobo8204 commented Feb 16, 2025

Did you check the docs?

  • I have read all the NeMo-Guardrails docs

Is your feature request related to a problem? Please describe.

@app.on_event is deprecated. Suggest to use the new lifespan context manager @asynccontextmanager.

Describe the solution you'd like

Update the @app.on_event to @asynccontextmanager

Describe alternatives you've considered

No relevant alternatives, just update the lifecycle management decorator

Additional context

No response

@xiaobo8204 xiaobo8204 added enhancement New feature or request status: needs triage New issues that have not yet been reviewed or categorized. labels Feb 16, 2025
@xiaobo8204
Copy link
Contributor Author

xiaobo8204 commented Feb 16, 2025

@Pouyanpi hi, raise the PR for this quick change here: #999, can you help check, thanks a lot...

@xiaobo8204 xiaobo8204 changed the title feature: replace FastAPI lifecycle management to use lifespan context manager feature: replace FastAPI lifecycle management to use the new lifespan context manager Feb 16, 2025
@Pouyanpi Pouyanpi self-assigned this Feb 21, 2025
@Pouyanpi Pouyanpi removed the status: needs triage New issues that have not yet been reviewed or categorized. label Feb 21, 2025
@Pouyanpi
Copy link
Collaborator

Thank you very much @xiaobo8204 for opening this issue and also opening a PR for it. I will review it and probably will be part of 0.13.0 release.

@Pouyanpi Pouyanpi added this to the v0.13.0 milestone Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants