You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/docs/release-notes.md
+23
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,29 @@ hide:
10
10
### Breaking Changes
11
11
12
12
* 🐛 Fix unhandled growing memory for internal server errors, refactor dependencies with `yield` and `except` to require raising again as in regular Python. PR [#11191](https://github.com/tiangolo/fastapi/pull/11191) by [@tiangolo](https://github.com/tiangolo).
13
+
* This is a breaking change (and only slightly) if you used dependencies with `yield`, used `except` in those dependencies, and didn't raise again.
14
+
* This was reported internally by [@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.
15
+
* Read the new docs: [Dependencies with `yield` and `except`](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/#dependencies-with-yield-and-except).
16
+
17
+
In short, if you had dependencies that looked like:
18
+
19
+
```Python
20
+
defmy_dep():
21
+
try:
22
+
yield
23
+
except SomeException:
24
+
pass
25
+
```
26
+
27
+
Now you need to make sure you raise again after `except`, just as you would in regular Python:
0 commit comments