[issue9985] difflib.SequenceMatcher has slightly buggy and undocumented caching behavior

2019-08-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: This was fixed for Python 2.7 and Python 3.4 and later. -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue9985] difflib.SequenceMatcher has slightly buggy and undocumented caching behavior

2019-03-15 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9985] difflib.SequenceMatcher has slightly buggy and undocumented caching behavior

2015-02-26 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9985 ___ ___

[issue9985] difflib.SequenceMatcher has slightly buggy and undocumented caching behavior

2015-02-24 Thread Mark Lawrence
Mark Lawrence added the comment: I believe this has been fixed by changesets f02a563ad1bf and ed73c127421c in #21635. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9985

[issue9985] difflib.SequenceMatcher has slightly buggy and undocumented caching behavior

2010-10-01 Thread Christoph Burgmer
Christoph Burgmer cburg...@ira.uka.de added the comment: Here's a test case and a fix for get_matching_blocks() to return the same content on subsequent calls. -- keywords: +patch nosy: +christoph Added file: http://bugs.python.org/file19084/get_matching_blocks.diff

[issue9985] difflib.SequenceMatcher has slightly buggy and undocumented caching behavior

2010-10-01 Thread Christoph Burgmer
Christoph Burgmer cburg...@ira.uka.de added the comment: BTW, here's the commit that broke the behavior in the first place: http://svn.python.org/view/python/trunk/Lib/difflib.py?r1=54230r2=59907 -- ___ Python tracker rep...@bugs.python.org

[issue9985] difflib.SequenceMatcher has slightly buggy and undocumented caching behavior

2010-10-01 Thread Marien Zwart
Marien Zwart m_zw...@123mail.org added the comment: That fixes the first problem in python 2. It should do: self.matching_blocks = [Match._make(t) for t in non_adjacent] in python 3 though, or it will return an already-exhausted map object if it is called again. This leaves the problem of

[issue9985] difflib.SequenceMatcher has slightly buggy and undocumented caching behavior

2010-10-01 Thread Ned Deily
Ned Deily n...@acm.org added the comment: (+nosy Raymond as committer of r59907 and removing python2.6 since this is not a security issue) -- nosy: +ned.deily, rhettinger stage: - needs patch versions: -Python 2.6 ___ Python tracker

[issue9985] difflib.SequenceMatcher has slightly buggy and undocumented caching behavior

2010-09-29 Thread Marien Zwart
New submission from Marien Zwart m_zw...@123mail.org: SequenceMatcher caches the result of get_matching_blocks and get_opcodes. There are some problems with this: What get_matching_blocks caches is a list of tuples. The first call does not return that list: it returns map(Match._make,