Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🐛 Fix unhandled growing memory for internal server errors, refactor dependencies withyield andexcept to require raising again as in regular Python#11191

Merged
tiangolo merged 7 commits intomasterfrom
raise-dependency
Feb 24, 2024
Merged

🐛 Fix unhandled growing memory for internal server errors, refactor dependencies withyield andexcept to require raising again as in regular Python#11191
tiangolo merged 7 commits intomasterfrom
raise-dependency

Conversation

@tiangolo
Copy link
Member

@tiangolotiangolo commentedFeb 24, 2024
edited
Loading

🐛 Fix unhandled growing memory for internal server errors, refactor dependencies withyield andexcept to require raising again as in regular Python.

This fixes a bug of growing unhandled memory/memory leak reported internally by@rushilsrivastava. 🤓

MRigal reacted with thumbs up emoji
@tiangolotiangolo marked this pull request as ready for reviewFebruary 24, 2024 23:05
@tiangolotiangolo merged commitbf771bd intomasterFeb 24, 2024
@tiangolotiangolo deleted the raise-dependency branchFebruary 24, 2024 23:06
@rushilsrivastava
Copy link

Thanks for the patch, sorry I didn't get a chance to open the discussion! 🙌

gisbdzhch pushed a commit to gisktzh/gb3-search_api that referenced this pull requestFeb 29, 2024
This PR contains the following updates:| Package | Change | Age | Adoption | Passing | Confidence ||---|---|---|---|---|---|| [fastapi](https://github.com/tiangolo/fastapi) | `==0.109.2` -> `==0.110.0` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/fastapi/0.110.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/fastapi/0.110.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/fastapi/0.109.2/0.110.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/fastapi/0.109.2/0.110.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |---### Release Notes<details><summary>tiangolo/fastapi (fastapi)</summary>### [`v0.110.0`](https://github.com/tiangolo/fastapi/releases/tag/0.110.0)[Compare Source](fastapi/fastapi@0.109.2...0.110.0)##### Breaking Changes-   🐛 Fix unhandled growing memory for internal server errors, refactor dependencies with `yield` and `except` to require raising again as in regular Python. PR [#&#8203;11191](fastapi/fastapi#11191) by [@&#8203;tiangolo](https://github.com/tiangolo).    -   This is a breaking change (and only slightly) if you used dependencies with `yield`, used `except` in those dependencies, and didn't raise again.    -   This was reported internally by [@&#8203;rushilsrivastava](https://github.com/rushilsrivastava) as a memory leak when the server had unhandled exceptions that would produce internal server errors, the memory allocated before that point would not be released.    -   Read the new docs: [Dependencies with `yield` and `except`](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/#dependencies-with-yield-and-except).In short, if you had dependencies that looked like:```Pythondef my_dep():    try:        yield    except SomeException:        pass```Now you need to make sure you raise again after `except`, just as you would in regular Python:```Pythondef my_dep():    try:        yield    except SomeException:        raise```##### Docs-   ✏️ Fix minor typos in `docs/ko/docs/`. PR [#&#8203;11126](fastapi/fastapi#11126) by [@&#8203;KaniKim](https://github.com/KaniKim).-   ✏️ Fix minor typo in `fastapi/applications.py`. PR [#&#8203;11099](fastapi/fastapi#11099) by [@&#8203;JacobHayes](https://github.com/JacobHayes).##### Translations-   🌐 Add German translation for `docs/de/docs/reference/background.md`. PR [#&#8203;10820](fastapi/fastapi#10820) by [@&#8203;nilslindemann](https://github.com/nilslindemann).-   🌐 Add German translation for `docs/de/docs/reference/templating.md`. PR [#&#8203;10842](fastapi/fastapi#10842) by [@&#820...
hsuanchi pushed a commit to hsuanchi/fastapi that referenced this pull requestMay 26, 2024
…ependencies with `yield` and `except` to require raising again as in regular Python (fastapi#11191)Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@tiangolo@rushilsrivastava

Comments


[8]ページ先頭

©2009-2026 Movatter.jp