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.
Created on 2007年08月27日 00:10 by hupp, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| tempfile-newline-encoding.patch | hupp, 2007年08月27日 00:10 | |||
| Messages (3) | |||
|---|---|---|---|
| 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) * (Python committer) | 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. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:26 | admin | set | github: 45374 |
| 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 | |