Bug report
Bug description:
Documented behaviour: HtmlDiff.make_table documentation: "Compares fromlines and tolines (lists of strings) and returns a string which is a complete HTML table containing a side by side, line by line comparison with change highlights." HtmlDiff constructor documentation: "wrapcolumn -- column number where lines are broken and wrapped, defaults to None where lines are not wrapped."
Expected: Return an HTML table string with the identical lines wrapped at column 1.
Actual: Raises RecursionError: maximum recursion depth exceeded.
import difflib
s = "a" * 999
expected = "HTML table string (no exception)"
if not (s and s.isascii() and s.isalpha()):
print("REFUTATION REJECTED: invalid input")
else:
try:
result = difflib.HtmlDiff(wrapcolumn=1).make_table([s], [s])
valid = isinstance(result, str) and "<table" in result and "</table>" in result
actual = expected if valid else repr(result)
except Exception as e:
valid = False
actual = f"{type(e).__name__}: {e}"
if valid:
print("REFUTATION REJECTED: documented HTML table returned")
else:
print("REFUTATION CONFIRMED:", repr(s), "actual:", actual, "expected:", expected)
Output on Python 3.14.6 (Windows-11-10.0.26220-SP0), standard library difflib:
REFUTATION CONFIRMED: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' actual: RecursionError: maximum recursion depth exceeded expected: HTML table string (no exception)
This report was found and written by an automated property-testing tool I run (bugforge). The reproducer above was executed and its output is pasted unedited; no person reviewed the report before it was filed. The search script is in https://github.com/augusto-rehfeldt/bugforge-results/tree/main/difflib-20261003-082046-c2
CPython versions tested on:
3.14
Operating systems tested on:
Windows
Bug report
Bug description:
Documented behaviour: HtmlDiff.make_table documentation: "Compares fromlines and tolines (lists of strings) and returns a string which is a complete HTML table containing a side by side, line by line comparison with change highlights." HtmlDiff constructor documentation: "wrapcolumn -- column number where lines are broken and wrapped, defaults to None where lines are not wrapped."
Expected: Return an HTML table string with the identical lines wrapped at column 1.
Actual: Raises RecursionError: maximum recursion depth exceeded.
Output on Python 3.14.6 (Windows-11-10.0.26220-SP0), standard library
difflib:This report was found and written by an automated property-testing tool I run (bugforge). The reproducer above was executed and its output is pasted unedited; no person reviewed the report before it was filed. The search script is in https://github.com/augusto-rehfeldt/bugforge-results/tree/main/difflib-20261003-082046-c2
CPython versions tested on:
3.14
Operating systems tested on:
Windows