On Fri, Dec 15, 2023 at 4:51 AM Yasuhito FUTATSUKI <futat...@yf.bsdclub.org> wrote:
> Hi, > > On 2023/12/15 18:44, gst...@apache.org wrote: > > Author: gstein > > Date: Fri Dec 15 09:44:03 2023 > > New Revision: 1914679 > > > > URL: http://svn.apache.org/viewvc?rev=1914679&view=rev > > Log: > > class DifflibDiffContent does not work, and maybe never did. There is > > no .next() method on the unified_diff() result object. While it would > > be possible to use the next() function, it is better to just remove > > this entirely and require the host OS to have a diff executable (not a > > hard requirement). > > I don't want to make objection to removing DifflibDiffContent, but > it seems it worked on Python 2, where generator object has next() > method instead of .__next__() method. So it is a missed feature > while porting Python 3. > We could probably use the next() builtin function (available in Py2 and Py3). But should we? Is there a platform without a diff executable? Maybe Windows? I found this "use difflib" feature was added in 2010, in r1032568, with no further work in the intervening years. How many people use this? Consider: it didn't work in Py3. "All" unix-ish systems have "diff". So we're talking about (maybe?) Windows-based svn administrators using Python 2. Personally, I think it is safe to just omit this "feature", which is likely unused today. Cheers, -g