ResourceWarnings with Python >=3.2

Arfrever Frehtes Taifersar Arahesis avatarArfrever Frehtes Taifersar Arahesis created an issue

There are some new recently introduced ResourceWarnings in Sphinx. I use Sphinx trunk (revision 95a2a34b6a51).

Results of test suite with Python 3.3:

.........................../tmp/sphinx/build/lib/sphinx/builders/gettext.py:163: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/sphinx/tests/root/_templates/customsb.html'>
  context = open(template, 'r', encoding='utf-8').read()
/tmp/sphinx/build/lib/sphinx/builders/gettext.py:163: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/sphinx/tests/root/_templates/layout.html'>
  context = open(template, 'r', encoding='utf-8').read()
/tmp/sphinx/build/lib/sphinx/builders/gettext.py:163: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/sphinx/tests/root/_templates/contentssb.html'>
  context = open(template, 'r', encoding='utf-8').read()
.../tmp/sphinx/build/lib/sphinx/builders/gettext.py:163: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/sphinx/tests/roots/test-intl/_templates/index.html'>
  context = open(template, 'r', encoding='utf-8').read()
................................................................................................................................................................................................................./usr/lib64/python3.3/site-packages/nose/case.py:198: DeprecationWarning: Please use assertEqual instead.
  self.test(*self.arg)
........................SS........................
----------------------------------------------------------------------
Ran 289 tests in 141.999s

OK (SKIP=2)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.