[Python-Dev] Recent changes to TextIOWrapper and its tests

Serhiy Storchaka storchaka at gmail.com
Tue Mar 19 09:03:35 CET 2013


On 18.03.13 22:26, Jeff Allen wrote:
> The puzzle is that it requires t.read() to succeed.
>
> When I insert a check for bytes type in all the places it seems
> necessary in my code, I pass the first two conditions, but since
> t.read() also raises TypeError, the overall test fails. Is reading the
> stream with read() intended to succeed? Why is this desired?

And alternative option is to change C implementation of 
TextIOWrapper.read() to raise an exception in this case. However I worry 
that it can break backward compatibility. Are there other tests (in 
other test files) which fail with a new Jython TextIOWrapper?




More information about the Python-Dev mailing list