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

Running Pants as a Pex results in Python ResourceWarning #11058

Closed
Eric-Arellano opened this issue Oct 27, 2020 · 3 comments
Closed

Running Pants as a Pex results in Python ResourceWarning #11058

Eric-Arellano opened this issue Oct 27, 2020 · 3 comments

Comments

@Eric-Arellano
Copy link
Contributor

We see this in CI: https://travis-ci.com/github/pantsbuild/pants/jobs/408355502#L1163

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

To reproduce, run build-support/bin/bootstrap_pants_pex.sh and then ./pants.pex --version.

@jsirois
Copy link
Contributor

jsirois commented Nov 6, 2020

Hrm, that's unfortunate since Pex only opens /dev/null at the very end of a PEX run and with intention. IOW there is no real leak :/
https://github.com/pantsbuild/pex/blob/47047749f52d80f16dd8b4fd940e76c0c110fdd0/pex/pex.py#L458-L464

I'll open a Pex issue for this.

@jsirois
Copy link
Contributor

jsirois commented Nov 6, 2020

pex-tool/pex#1101

@Eric-Arellano
Copy link
Contributor Author

Closing thanks to pex-tool/pex#1101

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

No branches or pull requests

2 participants