Issue1033
Created on 2007-08-27 00:10 by hupp, last changed 2007-08-28 03:30 by gvanrossum.
|
msg55328 - (view) |
Author: Adam Hupp (hupp) |
Date: 2007-08-27 00:10 |
|
It would be useful for tempfile.TemporaryFile and friends to pass
newline and encoding arguments to the underlying io.open call. For
example, several tests in test_csv use TemporaryFile and need to handle
unicode file output or preserve exact newlines. This is simpler with
direct support in TemporaryFile.
The attached patch makes the following changes:
1) tempfile.TemporaryFile, NamedTemporaryFile, and SpooledTemporaryFile
now pass newline and encoding to the underlying io.open call.
2) test_tempfile is updated
3) test_csv is updated to use the new arguments.
|
|
msg55329 - (view) |
Author: Adam Hupp (hupp) |
Date: 2007-08-27 00:14 |
|
One change I forgot to mention that may need discussion. I've changed
the 'bufsize' arguments in tempfile to 'buffering', since that is
consistent with the same change in os.fdopen.
|
|
msg55349 - (view) |
Author: Guido van Rossum (gvanrossum) |
Date: 2007-08-28 03:30 |
|
Thanks!
Committed revision 57594.
General note: please run Tools/scripts/reindent.py over your files after
editing so I won't have to.
|
|
| Date |
User |
Action |
Args |
| 2007-08-28 03:30:24 | gvanrossum | set | status: open -> closed resolution: accepted messages:
+ msg55349 nosy:
+ gvanrossum |
| 2007-08-27 00:14:05 | hupp | set | messages:
+ msg55329 |
| 2007-08-27 00:10:44 | hupp | create | |
|