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 ResourceWarnings #7

Closed
seporaitis opened this issue Mar 22, 2016 · 2 comments
Closed

Fix ResourceWarnings #7

seporaitis opened this issue Mar 22, 2016 · 2 comments

Comments

@seporaitis
Copy link
Contributor

As seen in any recent Travis CI build python3 test runs have this output:

test_barcode (tests.test_treepoem.TreepoemTestCase) ... /Users/julius/work/code/treepoem/.tox/py35/lib/python3.5/site-packages/PIL/EpsImagePlugin.py:337: ResourceWarning: unclosed file <_io.BufferedReader name=9>
  self.im = Ghostscript(self.tile, self.size, self.fp, scale)
/Users/julius/work/code/treepoem/.tox/py35/lib/python3.5/site-packages/PIL/EpsImagePlugin.py:337: ResourceWarning: unclosed file <_io.BufferedReader name=9>
  self.im = Ghostscript(self.tile, self.size, self.fp, scale)
/Users/julius/work/code/treepoem/.tox/py35/lib/python3.5/site-packages/PIL/EpsImagePlugin.py:337: ResourceWarning: unclosed file <_io.BufferedReader name=9>
  self.im = Ghostscript(self.tile, self.size, self.fp, scale)
/Users/julius/work/code/treepoem/.tox/py35/lib/python3.5/site-packages/PIL/EpsImagePlugin.py:337: ResourceWarning: unclosed file <_io.BufferedReader name=9>
  self.im = Ghostscript(self.tile, self.size, self.fp, scale)
/Users/julius/work/code/treepoem/.tox/py35/lib/python3.5/site-packages/PIL/EpsImagePlugin.py:337: ResourceWarning: unclosed file <_io.BufferedReader name=9>
  self.im = Ghostscript(self.tile, self.size, self.fp, scale)
/Users/julius/work/code/treepoem/.tox/py35/lib/python3.5/site-packages/PIL/EpsImagePlugin.py:337: ResourceWarning: unclosed file <_io.BufferedReader name=9>
  self.im = Ghostscript(self.tile, self.size, self.fp, scale)
ok

This is most likely Pillow library issue. I traced it back to EpsImageFile.load & EpsImagePlugins.Ghostscript constructor and something to do with handling of temporary files.

@adamchainz
Copy link
Owner

Looks like python-pillow/Pillow#835

@adamchainz
Copy link
Owner

No more ResourceWarnings appearing on build, seems fixed

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

No branches or pull requests

2 participants