If the doctest file has both Windows and unix lineendings you get an error. Yeah, I know, it's not a serious bug, but it's also easy to fix. Attached patch with test. Seems to not be an issue on Python 3.
I would call this a bug and still 2.7 eligible. The patch amounts to opening the file to be tested in universal newline mode + a corresponding test. If Python will run files with mixed line endings, doctest should test them.
The string in the test does not have mixed line endings, and the accompanying comment talks about testing files with CRLF on Unix. Terry, do you want to (update and) commit this?
By 'update', do you mean to change +Due to the way releases are made on different platforms, we sometimes test +files on a *nix system with Windows file endings. Unfortunately, that leaves +some of the test files broken: to something like +Issue8473: Make sure doctest works with mixed line endings. +When this test is run on *nix, it has the side effect of making sure +that doctest can handle Windows line endings on *nix. Or just leave the last two lines off? And also change '/r/n/r/n' x 2 to '/r/n/n' and '/n/r/n'.
I changed the test text to talk only about universal newline mode, since that is what it is testing. Someone could add a test for actual mixed line endings to it if they like.