This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Jeff.Kaufman
Recipients Jeff.Kaufman
Date 2018-04-04.15:18:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522855104.15.0.682650639539.issue33224@psf.upfronthosting.co.za>
In-reply-to
Content
With python built at HEAD (c51d8c9b) and at 3.7b3 (fcd4e03e08) the code:

    import difflib
    for fromdata, todata, flag in difflib._mdiff(
        ["2"], ["3"], 1):
      pass

produces:

    Traceback (most recent call last):
      File "/home/jefftk/cpython/Lib/difflib.py", line 1638, in _mdiff
        from_line, to_line, found_diff = next(line_pair_iterator)
    StopIteration

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "/home/jefftk/icdiff/repro.py", line 3, in <module>
        ["2"], ["3"], 1):
    RuntimeError: generator raised StopIteration

In python 3.5 and 3.6 I don't get an error.

This is probably due to https://bugs.python.org/issue32670 which implements PEP 479, but I this this isn't supposed to happen in library code?
History
Date User Action Args
2018-04-04 15:18:24Jeff.Kaufmansetrecipients: + Jeff.Kaufman
2018-04-04 15:18:24Jeff.Kaufmansetmessageid: <1522855104.15.0.682650639539.issue33224@psf.upfronthosting.co.za>
2018-04-04 15:18:24Jeff.Kaufmanlinkissue33224 messages
2018-04-04 15:18:23Jeff.Kaufmancreate