Skip to content

Commit 32b56a8

Browse files
committed
📝 Update release notes
1 parent b6b0f2a commit 32b56a8

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/en/docs/release-notes.md

+23
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,29 @@ hide:
1010
### Breaking Changes
1111

1212
* 🐛 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+
def my_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:
28+
29+
```Python
30+
def my_dep():
31+
try:
32+
yield
33+
except SomeException:
34+
raise
35+
```
1336

1437
### Docs
1538

0 commit comments

Comments
 (0)