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

BUG: avoid ResourceWarnings in the boxlib frontend (⏰ wait for #4845) #4891

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yut23
Copy link
Member

@yut23 yut23 commented May 1, 2024

PR Summary

Manually close all the header and parameter files that are opened outside a with statement.

Fixes #4890.

PR Checklist

  • New features are documented, with docstrings and narrative docs
  • Adds a test for any bugs fixed. Adds tests for new features.

Manually close all the header and parameter files that are opened
outside a `with` statement.

Fixes yt-project#4890.
neutrinoceros
neutrinoceros previously approved these changes May 1, 2024
Copy link
Member

@neutrinoceros neutrinoceros left a comment

Choose a reason for hiding this comment

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

This seems uncontroversial but I never got why we were leaving handles opened in the first place, so I'd like to leave this open for a little while in case someone objects.

@neutrinoceros neutrinoceros added this to the 4.4.0 milestone May 1, 2024
matthewturk
matthewturk previously approved these changes May 1, 2024
Copy link
Member

@matthewturk matthewturk left a comment

Choose a reason for hiding this comment

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

Good change. My suggestions are optional. Thanks for catching this -- I'm not sure why we left handles open!

yt/frontends/boxlib/data_structures.py Outdated Show resolved Hide resolved
yt/frontends/boxlib/data_structures.py Outdated Show resolved Hide resolved
Co-authored-by: Matthew Turk <matthewturk@gmail.com>
@yut23 yut23 dismissed stale reviews from matthewturk and neutrinoceros via dd4fe98 May 1, 2024 17:46
@neutrinoceros neutrinoceros changed the title BUG: avoid ResourceWarnings in the boxlib frontend BUG: avoid ResourceWarnings in the boxlib frontend (⏰ wait for #4845) May 2, 2024
@neutrinoceros neutrinoceros marked this pull request as draft May 2, 2024 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: ResourceWarnings for unclosed files in boxlib frontend
3 participants