Éric Araujo <mer...@netwok.org> added the comment:

>>> where does the 1ko barrier come from? Was it only chosen out of 
>>> performance considerations [...]
>> Most certainly.  I’ll look at the history of the file later to try to
>> find the developer who decided that.
> Guido van Rossum made the changes. Before that a temporary file was
> created for every form field.

Do you have the changeset ID?

> A last question [...]

For a new feature, it’s okay to change signatures.  Backward compatibility is 
preserved by appending the new argument at the end of the arguments lists, and 
making it optional.

Given that tempfile respects the TMP and TMPDIR environment variables, do you 
think it would be possible for users to control the download dir for uploaded 
files by editing os.environ?  This would require no change to cgi.  If that’s 
not possible, then we’ll have to change the FieldStorage class.

> Also, I believe one can think of other reasons to give this freedom.

Can you think about some of them?

>    def __init__(self, tempdir=tempfile.gettempdir()):
> or a somewhat more convoluted form that would avoid importing
> tempfile needlessly.

You could probably have a None argument that would be passed down to tempfile.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9968>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to