[issue1706039] Added clearerr() to clear EOF state

Scott Dial report at bugs.python.org
Thu Mar 10 03:09:08 CET 2011


Scott Dial <scott at scottdial.com> added the comment:

I'm well aware of the limited use of Py_UniversalNewlineFgets() in py3k, but it remains the case that it is a public API that fails to work correctly under the conditions specified by the reporter, and Alexander confirmed the original patch fixed the issue. AFAICT, there no longer are any test cases (beyond the indirect testing of the dependent code) for Py_UniversalNewlineFgets().

One of the issues with applying the patch to tip was due to commenting out some code in it:

     /* if ( c == EOF && skipnextlf )
         newlinetypes |= NEWLINE_CR; */

For issue8914, which really should've just deleted those two lines, but there was not such an extensive review of that change.

The unittests have there own merit. The file object API is supposed to behave in the manner that the tests exercise them. There are currently no tests that would inform us if any change broke this documented behavior. If you want to split the patch in two to treat them as independent items, then fine.

Otherwise, close the issue as WONTFIX due to obsolescence.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1706039>
_______________________________________


More information about the Python-bugs-list mailing list