nose-devs/nose — Issue #403: linecache.getlines signature differs from patched version of nose.ext.dtcompat
Author: jpellerin
Created: 2011-12-14 16:10:00+00:00
State: open

What steps will reproduce the problem?
1. I don't know what I changed or updated but somehow I'm getting the following exception during nosetest:

Traceback (most recent call last):
File "/Users/olt/dev/venv/mapproxy-trunk/lib/python2.7/site-packages/nose/ext/dtcompat.py", line 1972, in runTest
test, out=new.write, clear_globs=False)
File "/Users/olt/dev/venv/mapproxy-trunk/lib/python2.7/site-packages/nose/ext/dtcompat.py", line 1316, in run
return self.__run(test, compileflags, out)
File "/Users/olt/dev/venv/mapproxy-trunk/lib/python2.7/site-packages/nose/ext/dtcompat.py", line 1207, in __run
got += _exception_traceback(exc_info)
File "/Users/olt/dev/venv/mapproxy-trunk/lib/python2.7/site-packages/nose/ext/dtcompat.py", line 245, in _exception_traceback
traceback.print_exception(exc_type, exc_val, exc_tb, file=excout)
File "/usr/local/Cellar/python/2.7/lib/python2.7/traceback.py", line 125, in print_exception
print_tb(tb, limit, file)
File "/usr/local/Cellar/python/2.7/lib/python2.7/traceback.py", line 69, in print_tb
line = linecache.getline(filename, lineno, f.f_globals)
File "/Users/olt/dev/venv/mapproxy-trunk/lib/python2.7/linecache.py", line 14, in getline
lines = getlines(filename, module_globals)
TypeError: __patched_linecache_getlines() takes exactly 2 arguments (3 given)

What version of the product are you using? On what operating system?

Python 2.7, nosetest 1.0.0

Please provide any additional information below.

Official signature:
http://svn.python.org/view/python/branches/release27-maint/Lib/linecache.py?view=markup

Patched signature:
http://code.google.com/p/python-nose/source/browse/nose/ext/dtcompat.py#1262

Solution:
add module_cache=None to getlines

Google Code Info:
Issue #: 393
Author: olt...@gmail.com
Created On: 2011-01-19T08:24:33.000Z
Closed On: