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(frontend): remove ResourceWarning from using TemporaryDirectory #802

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

fd0r
Copy link
Contributor

@fd0r fd0r commented Apr 23, 2024

We currently have something like var = TemporaryDirectory without explicitly calling the close method on var thus raising a ResourceWarning when the resource is implicitely cleaned-up.

This could be avoided by using mkdtemp instead.

@cla-bot cla-bot bot added the cla-signed label Apr 23, 2024
Copy link
Contributor

@umut-sahin umut-sahin left a comment

Choose a reason for hiding this comment

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

Wait I didn't see that the CI is red. I'll approve once it's green 👍

@fd0r fd0r marked this pull request as ready for review April 24, 2024 11:28
@fd0r fd0r force-pushed the small_temp_file_fix branch from 7513610 to 90971f8 Compare April 24, 2024 11:51
We currently have something like `var = TemporaryDirectory`
without explicitly calling the `close` method on `var` thus
raising a `ResourceWarning` when the resource is implicitely cleaned-up.

This could be avoided by using `mkdtemp` instead.
@fd0r fd0r force-pushed the small_temp_file_fix branch from 90971f8 to da28812 Compare April 24, 2024 14:37
@fd0r
Copy link
Contributor Author

fd0r commented Apr 25, 2024

More changes than expected but the CI is happy.

It required a signature change, not sure if it's fine with you guys?

Copy link
Contributor

@umut-sahin umut-sahin left a comment

Choose a reason for hiding this comment

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

It's okay IMO.

@umut-sahin umut-sahin merged commit 5c5f573 into main Apr 25, 2024
27 checks passed
@umut-sahin umut-sahin deleted the small_temp_file_fix branch April 25, 2024 07:02
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.

2 participants