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 support forStreamingResponses with dependencies withyield orUploadFiles, close after the response is done#14099

Merged
tiangolo merged 28 commits intomasterfrom
yield
Sep 29, 2025
Merged

🐛 Fix support forStreamingResponses with dependencies withyield orUploadFiles, close after the response is done#14099
tiangolo merged 28 commits intomasterfrom
yield

Conversation

@tiangolo
Copy link
Member

@tiangolotiangolo commentedSep 21, 2025
edited
Loading

🐛 Fix support forStreamingResponses with dependencies withyield orUploadFiles, close after the response is done


There's (again) anAsyncExitStack middleware, now used mainly to close objects after the response is done.

There's also a new wrapper duplicating some logic in Starlette but creating anAsyncExitStack for the exit code in dependencies withyield, for regular responses and WebSockets as well.

The exit code of dependencies withyield is now executed after the response is done.

alippai, JasonLovesDoggo, hidaris, yohann84L, falkben, edgarrmondragon, alejsdev, mvanderlee, silvermete0r, brian-goo, and 6 more reacted with hooray emoji
tiangoloand others added19 commitsSeptember 3, 2025 17:26
…tion`) in dependencies with `yield` in the exit code, do not support them in background tasks (#10831)"This reverts commita4aa79e.
@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@tiangolotiangolo added the bugSomething isn't working labelSep 21, 2025
@tiangolotiangolo marked this pull request as ready for reviewSeptember 21, 2025 18:58
@tiangolotiangolo changed the title🐛 Fix support for streaming responses with dependencies withyield, close after the response is done🐛 Fix support forStreamingResponses with dependencies withyield orUploadFiles, close after the response is doneSep 21, 2025
@tiangolotiangolo merged commite329d78 intomasterSep 29, 2025
53 of 54 checks passed
@tiangolotiangolo deleted the yield branchSeptember 29, 2025 03:29
nilslindemann added a commit to nilslindemann/fastapi that referenced this pull requestOct 1, 2025
YuriiMotov added a commit that referenced this pull requestOct 1, 2025
* Sync German docs with#13917Plus a typo fix in tutorial/security/oauth2-jwt.md line 89.* Sync german docs with#14099---------Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
@anton-ryzhov
Copy link

This PR also fixes#12508

tiangolo reacted with hooray emoji

@anton-ryzhov
Copy link

But introduces another bug as describedhere

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

bugSomething isn't working

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@tiangolo@anton-ryzhov

Comments


[8]ページ先頭

©2009-2026 Movatter.jp