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

DeprecationWarnings and ResourceWarnings with Python >=3.2 #213

Closed
sqlalchemy-bot opened this issue Apr 13, 2013 · 2 comments
Closed

DeprecationWarnings and ResourceWarnings with Python >=3.2 #213

sqlalchemy-bot opened this issue Apr 13, 2013 · 2 comments

Comments

@sqlalchemy-bot
Copy link

@sqlalchemy-bot sqlalchemy-bot commented Apr 13, 2013

Migrated issue, originally created by Anonymous

When warnings are enabled (using e.g. PYTHONWARNINGS="d" environmental variable), then test suite with Python >=3.2 triggers some DeprecationWarnings and ResourceWarnings.

$ nosetests-3.3
..........S..........S................................................................................................................/tmp/Mako-0.8.0/mako/util.py:370: DeprecationWarning: imp.load_source() is deprecated; use importlib.machinery.SourceFileLoader(name, pathname).load_module() instead
  return imp.load_source(module_id, path, fp)
............................S................./tmp/Mako-0.8.0/test/test_lexer.py:777: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/Mako-0.8.0/test/templates/crlf.html'>
  template = open(self._file_path("crlf.html"), 'rb').read()
..................................................................../tmp/Mako-0.8.0/test/test_lru.py:26: DeprecationWarning: Please use assertTrue instead.
  self.assert_(1 not in l)
/tmp/Mako-0.8.0/test/test_lru.py:27: DeprecationWarning: Please use assertTrue instead.
  self.assert_(2 not in l)
/tmp/Mako-0.8.0/test/test_lru.py:31: DeprecationWarning: Please use assertTrue instead.
  self.assert_(id in l)
/tmp/Mako-0.8.0/test/test_lru.py:41: DeprecationWarning: Please use assertTrue instead.
  self.assert_(11 not in l)
/tmp/Mako-0.8.0/test/test_lru.py:42: DeprecationWarning: Please use assertTrue instead.
  self.assert_(13 not in l)
/tmp/Mako-0.8.0/test/test_lru.py:45: DeprecationWarning: Please use assertTrue instead.
  self.assert_(id in l)
...............................................................S................../tmp/Mako-0.8.0/test/test_template.py:222: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/Mako-0.8.0/test/templates/unicode_arguments_py3k.html'>
  open(self._file_path("unicode_arguments.html"), 'rb').read(),
................................../tmp/Mako-0.8.0/test/test_template.py:1026: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/Mako-0.8.0/test/templates/unicode_runtime_error.html'>
  source = open(self._file_path(filename), 'rb').read()
......................../tmp/Mako-0.8.0/test/test_util.py:36: DeprecationWarning: Please use assertTrue instead.
  self.failUnless('test_util' in str(data)) # str() for py3k
.
----------------------------------------------------------------------
Ran 389 tests in 12.536s

OK (SKIP=4)
@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Apr 13, 2013

Michael Bayer (@zzzeek) wrote:

those are all in c16198a including that inconvenient one regarding imp.load_source().

Loading

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Apr 13, 2013

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

Loading

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

Successfully merging a pull request may close this issue.

None yet
1 participant