New submission from Adam Hupp:

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.

----------
components: Library (Lib)
files: tempfile-newline-encoding.patch
messages: 55328
nosy: hupp
severity: normal
status: open
title: Support for newline and encoding in tempfile module
type: rfe
versions: Python 3.0

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1033>
__________________________________

Attachment: tempfile-newline-encoding.patch
Description: Binary data

_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to