Message127472
(I hope you meant I was working on a patch :)
Patch is done, but there is one remaining test failure that I'm not sure how to handle. The test is test_add_text_file_warns. The code checks to see if a file is a subclass of io.TextIOWrapper, and if so warns that this is deprecated, grabs the buffer attribute, and reads the file as binary. This works fine, except that in testing it I used a temporary file. On Linux that works great, but on Windows the temporary file is a tempfile._TemporaryFileWrapper, and that is *not* a subclass of io.TextIOWrapper. So the code falls through to the "this must be a binary file" code and fails with a TypeError.
Any thoughts on how to handle this edge case?
I've got stuff to do this afternoon but I'll check back later to see if anybody has any ideas and, if all else fails, will disable that test on Windows. It means the module doesn't handle temporary-text-file input on Windows correctly, but since we are deprecating text files anyway I think that is not a show stopper. |
|
Date |
User |
Action |
Args |
2011-01-29 19:24:41 | r.david.murray | set | recipients:
+ r.david.murray, georg.brandl, rhettinger, holdenweb, pitrou, vstinner, giampaolo.rodola, lregebro, sdaoden |
2011-01-29 19:24:40 | r.david.murray | set | messageid: <1296329080.85.0.272108662086.issue9124@psf.upfronthosting.co.za> |
2011-01-29 19:24:40 | r.david.murray | link | issue9124 messages |
2011-01-29 19:24:40 | r.david.murray | create | |
|