Issue #35 resolved

ResourceWarnings with Python 3.2

Arfrever Frehtes Taifersar Arahesis
created an issue

PYTHONWARNINGS="d" environmental variable enables additional warnings. {{{ $ PYTHONWARNINGS="d" python3.2 setup.py test setup.py:15: ResourceWarning: unclosed file <_io.TextIOWrapper name='README.txt' mode='r' encoding='UTF-8'> value = open(name+'.txt').read() setup.py:15: ResourceWarning: unclosed file <_io.TextIOWrapper name='CHANGES.txt' mode='r' encoding='UTF-8'> value = open(name+'.txt').read() ... /tmp/pyquery-1.1/pyquery/test.py:79: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pyquery-1.1/docs/api.txt' mode='r' encoding='UTF-8'> doc = open(self.path).read() /tmp/pyquery-1.1/pyquery/test.py:79: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pyquery-1.1/docs/attributes.txt' mode='r' encoding='UTF-8'> doc = open(self.path).read() /tmp/pyquery-1.1/pyquery/test.py:79: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pyquery-1.1/docs/changes.txt' mode='r' encoding='UTF-8'> doc = open(self.path).read() /tmp/pyquery-1.1/pyquery/test.py:79: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pyquery-1.1/docs/css.txt' mode='r' encoding='UTF-8'> doc = open(self.path).read() /tmp/pyquery-1.1/pyquery/test.py:79: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pyquery-1.1/docs/future.txt' mode='r' encoding='UTF-8'> doc = open(self.path).read() /tmp/pyquery-1.1/pyquery/test.py:79: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pyquery-1.1/docs/index.txt' mode='r' encoding='UTF-8'> doc = open(self.path).read() /tmp/pyquery-1.1/pyquery/test.py:79: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pyquery-1.1/pyquery/../README.txt' mode='r' encoding='UTF-8'> doc = open(self.path).read() /tmp/pyquery-1.1/pyquery/test.py:79: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pyquery-1.1/docs/testing.txt' mode='r' encoding='UTF-8'> doc = open(self.path).read() /tmp/pyquery-1.1/pyquery/test.py:102: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pyquery-1.1/pyquery/tests.txt' mode='r' encoding='UTF-8'> doc = open(self.path).read() /tmp/pyquery-1.1/pyquery/test.py:79: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pyquery-1.1/docs/tips.txt' mode='r' encoding='UTF-8'> doc = open(self.path).read() /tmp/pyquery-1.1/pyquery/test.py:79: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pyquery-1.1/docs/traversing.txt' mode='r' encoding='UTF-8'> doc = open(self.path).read() ... }}}

I'm attaching the patch.

Comments (3)

  1. Log in to comment