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.

Author eric.araujo
Recipients eric.araujo, orsenthil, phep
Date 2011-07-28.13:49:15
SpamBayes Score 1.0679175e-09
Marked as misclassified No
Message-id <1311860956.51.0.195052047195.issue9968@psf.upfronthosting.co.za>
In-reply-to
Content
>>> 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.
History
Date User Action Args
2011-07-28 13:49:16eric.araujosetrecipients: + eric.araujo, orsenthil, phep
2011-07-28 13:49:16eric.araujosetmessageid: <1311860956.51.0.195052047195.issue9968@psf.upfronthosting.co.za>
2011-07-28 13:49:15eric.araujolinkissue9968 messages
2011-07-28 13:49:15eric.araujocreate