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

Unclosed resource warning for /dev/null in PEX teardown. #1101

Closed
jsirois opened this issue Nov 6, 2020 · 0 comments · Fixed by #1102
Closed

Unclosed resource warning for /dev/null in PEX teardown. #1101

jsirois opened this issue Nov 6, 2020 · 0 comments · Fixed by #1102
Assignees

Comments

@jsirois
Copy link
Member

jsirois commented Nov 6, 2020

This presents as:

02:44:24.35 [WARN] sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/dev/null' mode='w' encoding='UTF-8'>

This is unfortunate since we really do intend to leave that filehandle open until Python tears it down :/:
https://github.com/pantsbuild/pex/blob/47047749f52d80f16dd8b4fd940e76c0c110fdd0/pex/pex.py#L458-L464

Fixing the warning will require warnings management or giving up on this robust way to /dev/null teardown and returning to the hackier construction of a DevNull file-like object as was done previously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant