[issue21253] unittest assertSequenceEqual can lead to Difflib.compare() crashing on mostly different sequences

John Taylor report at bugs.python.org
Thu Aug 20 19:44:35 CEST 2015


John Taylor added the comment:

I am seeing something similar in difflib.HtmlDiff.make_file() under Python 3.4.3 (windows 7).  Do I need to file a separate bug report?


File "H:\test\test.py", line 522, in print_differ
    diff = html.make_file(file1_data,file2_data,"dir 1","dir 2",True)
  File "C:\Python34\lib\difflib.py", line 1713, in make_file
    context=context,numlines=numlines))
  File "C:\Python34\lib\difflib.py", line 1962, in make_table
    fromlist,tolist,flaglist = self._collect_lines(diffs)
  File "C:\Python34\lib\difflib.py", line 1830, in _collect_lines
    for fromdata,todata,flag in diffs:
  File "C:\Python34\lib\difflib.py", line 1806, in _line_wrapper
    self._split_line(fromlist,fromline,fromtext)
  File "C:\Python34\lib\difflib.py", line 1791, in _split_line
    self._split_line(data_list,'>',line2)
  
  (repeated many times)

  File "C:\Python34\lib\difflib.py", line 1791, in _split_line
    self._split_line(data_list,'>',line2)
  File "C:\Python34\lib\difflib.py", line 1755, in _split_line
    if (size <= max) or ((size -(text.count('\0')*3)) <= max):
RuntimeError: maximum recursion depth exceeded in comparison

----------
nosy: +jftuga

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21253>
_______________________________________


More information about the Python-bugs-list mailing list