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

Comments

🐛 Close FormData (uploaded files) after the request is done#5465

Merged
tiangolo merged 8 commits intofastapi:masterfrom
adriangb:close-uploadfile
Nov 3, 2022
Merged

🐛 Close FormData (uploaded files) after the request is done#5465
tiangolo merged 8 commits intofastapi:masterfrom
adriangb:close-uploadfile

Conversation

@adriangb
Copy link
Contributor

No description provided.

tiangolo and yezz123 reacted with heart emojitiangolo, iudeen, yezz123, and mrlubos reacted with rocket emoji
@github-actions
Copy link
Contributor

📝 Docs preview for commit1dbbab6 at:https://633efa56cd26a21a02038871--fastapi.netlify.app

@codecov
Copy link

codecovbot commentedOct 6, 2022
edited
Loading

Codecov Report

Base:100.00% // Head:100.00% // No change to project coverage 👍

Coverage data is based on head(adcdf4d) compared to base(e92a864).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@##            master     #5465   +/-   ##=========================================  Coverage   100.00%   100.00%           =========================================  Files          540       540             Lines        13946     13969   +23     =========================================+ Hits         13946     13969   +23
Impacted FilesCoverage Δ
fastapi/__init__.py100.00% <100.00%> (ø)
fastapi/routing.py100.00% <100.00%> (ø)
tests/test_datastructures.py100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell ushow you rate us. Have a feature suggestion?Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment?Let us know in this issue.

@adriangbadriangb changed the titleClose uploadfileClose FormDataOct 6, 2022
@adriangb
Copy link
ContributorAuthor

Looks like failures are unrelated to this change:#5467

@github-actions
Copy link
Contributor

📝 Docs preview for commitc9d151f at:https://6345ec6f26f61e4cf776afde--fastapi.netlify.app

@adriangb
Copy link
ContributorAuthor

Failures resolved,@tiangolo I think this is ready for review :)

iudeen reacted with heart emoji

@github-actions
Copy link
Contributor

📝 Docs preview for commit2841a7a at:https://635395c8c62971556f3d83d9--fastapi.netlify.app

@tiangolo
Copy link
Member

Amazing, thank you@adriangb! 🙇

Do you think you could add a test or two for this?

@adriangb
Copy link
ContributorAuthor

I think this might difficult to test without touching the internals of something. It does run for every test, so we know that it doesn’t crash at least. I’ll think a bit about how to test this.

@github-actions
Copy link
Contributor

📝 Docs preview for commit8a28c02 at:https://636003d3f67bae05d1213030--fastapi.netlify.app

@github-actions
Copy link
Contributor

📝 Docs preview for commit1887507 at:https://636014d7a81e9f143d87f066--fastapi.netlify.app

@adriangb
Copy link
ContributorAuthor

So it seems like even Starlette is not testing thatUploadFile.close gets called. I don't see any way to test this other than doing some monkey patching of stuff like that.@tiangolo would you accept this without a test or is that a no-go?

@github-actions
Copy link
Contributor

📝 Docs preview for commita1fa01b at:https://636033086842892df4729409--fastapi.netlify.app

@github-actions
Copy link
Contributor

📝 Docs preview for commitadcdf4d at:https://6363ae2be9a9080232218a2a--fastapi.netlify.app

@tiangolotiangolo changed the titleClose FormData🐛 Close FormData (uploaded files) after the request is doneNov 3, 2022
@tiangolo
Copy link
Member

I found a way to test it! 🎉 I added the commit on top.

Thanks for the contribution! 🚀

@tiangolotiangolo merged commitac9f56e intofastapi:masterNov 3, 2022
@adriangbadriangb deleted the close-uploadfile branchNovember 3, 2022 13:17
@adriangb
Copy link
ContributorAuthor

That was genius!

@tiangolo
Copy link
Member

tiangolo commentedNov 3, 2022
edited
Loading

Haha thank you! 😊🙈🤓

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

2 more reviewers

@iudeeniudeeniudeen approved these changes

@yezz123yezz123yezz123 approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@adriangb@tiangolo@iudeen@yezz123

[8]ページ先頭

©2009-2026 Movatter.jp