[issue11632] difflib.unified_diff loses context

2016-10-18 Thread Steve Newcomb
Steve Newcomb added the comment: Context reporting is still buggy in Python 3.5.2: >>> [ x for x in difflib.unified_diff( "'on'\n", "'on'\n\n\n")] ['--- \n', '+++ \n', '@@ -3,3 +3,5 @@\n', ' n', " '", ' \n', '+\n', '+\n'] >>> import sys >>> sys.version '3.5.2 (default, Sep 10 2016, 08:21:44) \n[

[issue11632] difflib.unified_diff loses context

2013-09-20 Thread Benoît D Vages
Benoît D Vages added the comment: An other exemple if necessary (python 2.6 / 2.7) Got same behavior than mal using his script and my files. Seems to occur when the chunk of lines between 2 differences is repeated many times in the file -- nosy: +folder4ben Added file: http://bugs.pyth

[issue11632] difflib.unified_diff loses context

2013-04-29 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: +Python 3.4 -Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11632] difflib.unified_diff loses context

2013-04-29 Thread Miguel Latorre
Miguel Latorre added the comment: This bug is still present in python 2.7.4 and python 3.3.1. I attach another example, the result differs depending on number of lines to process (see test.py). -- nosy: +mal versions: +Python 2.7, Python 3.3 Added file: http://bugs.python.org/file30057/

[issue11632] difflib.unified_diff loses context

2011-03-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: 2.6 only gets security fixes now. -- nosy: +terry.reedy versions: -Python 2.6 ___ Python tracker ___ _

[issue11632] difflib.unified_diff loses context

2011-03-22 Thread Brice Videau
New submission from Brice Videau : unified_diff seems to lose the context when comparing the 2 files contained in the attached archive using this script : import difflib b1 = open("out1.short","r").read().splitlines(True) b2 = open("out2.short","r").read().splitlines(True) compare = difflib.uni