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 pakal
Recipients pakal
Date 2010-05-19.12:17:53
SpamBayes Score 5.3907263e-07
Marked as misclassified No
Message-id <1274271475.93.0.690807793227.issue8765@psf.upfronthosting.co.za>
In-reply-to
Content
In test_fileio, one of the tests wants to ensure writing to closed raw streams fails, but it actually tries to write an unicode string, which should rather lead to an immediate TypeError.

Here is a tiny patch to prevent the "double error cause" danger - this test is bugging me because my own I/O library cant pass the stdlib io tests in this case.

The initial problem here is that we can't write unicode to a buffered binary stream (TypeError), but we can do it with an unbufferred raw stream - as the C implementation of the latter does string coercion instead of raising TypeError.
Shouldn't we unify the behaviour of binary streams in such cases ?
History
Date User Action Args
2010-05-19 12:17:56pakalsetrecipients: + pakal
2010-05-19 12:17:55pakalsetmessageid: <1274271475.93.0.690807793227.issue8765@psf.upfronthosting.co.za>
2010-05-19 12:17:54pakallinkissue8765 messages
2010-05-19 12:17:53pakalcreate