Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resource warnings #3838

Merged
merged 7 commits into from
Nov 29, 2024
Merged

Conversation

gsakkis
Copy link
Contributor

@gsakkis gsakkis commented Oct 22, 2024

Description

  • Fix ResourceWarning from unclosed UploadFile instances
  • Fix ResourceWarning in run_server fixture
  • Report all warnings as errors unless explicitly silenced

Closes #3835

@gsakkis gsakkis requested review from a team as code owners October 22, 2024 06:37
@gsakkis gsakkis changed the title Fix: resource warnings fix: resource warnings Oct 22, 2024
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 98.35%. Comparing base (69181fd) to head (4f185c7).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
litestar/_multipart.py 58.33% 2 Missing and 3 partials ⚠️
litestar/_kwargs/extractors.py 77.77% 1 Missing and 1 partial ⚠️
litestar/datastructures/upload_file.py 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3838      +/-   ##
==========================================
- Coverage   98.40%   98.35%   -0.05%     
==========================================
  Files         344      344              
  Lines       15467    15485      +18     
  Branches     1701     1707       +6     
==========================================
+ Hits        15220    15230      +10     
- Misses        118      122       +4     
- Partials      129      133       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@cofin cofin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3838

@github-actions github-actions bot added area/kwargs area/multipart area/private-api This PR involves changes to the privatized API size: medium and removed size: small labels Nov 29, 2024
@provinzkraut provinzkraut enabled auto-merge (squash) November 29, 2024 13:34
@provinzkraut provinzkraut enabled auto-merge (squash) November 29, 2024 13:40
@provinzkraut provinzkraut merged commit 3510cab into litestar-org:main Nov 29, 2024
23 of 25 checks passed
@gsakkis gsakkis deleted the fix-resource-warnings branch November 29, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: ResourceWarning: Unclosed file <tempfile.SpooledTemporaryFile object ...>
4 participants