[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

Terry J. Reedy report at bugs.python.org
Tue Jan 12 02:47:17 EST 2016


Terry J. Reedy added the comment:

fileinput is in Python, hence the source is in Lib.  Online version is
https://hg.python.org/cpython/file/tip/Lib/fileinput.py
https://hg.python.org/cpython/file/tip/Lib/test/test_fileinput.py

Patching openhook itself looks trivial.  A test is the hard part. Laura, can you provide a test case? -- a short (one line?) file that fails with errors=strict and passes with something else?  A new test_errors method should be added to class Test_hook_encoded (the last testCase in the file).  I think the 'test' method would need revision.

----------
nosy: +terry.reedy

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


More information about the Python-bugs-list mailing list