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-30.13:45:18
SpamBayes Score 1.3853906e-08
Marked as misclassified No
Message-id <1312033520.91.0.700156512253.issue9968@psf.upfronthosting.co.za>
In-reply-to
Content
> After pondering this for a while I think the simpler is the better
> and I propose to add documentation to inform the reader that changing
> the temp directory through os.environ of tempfile.tempdir might worth
> consideration.
Okay.  Your patch has this doc change and also code changes.

I’ve read in the tempfile module docstring that in order to control the directory, you have to set tempfile.tempdir before calling any tempfile function.  I suspect this will not be okay for some applications.  I wonder if the same limitation applies when one sets os.environ['TMP'].

In the light of that, do you think the tempfile solution is enough, or do you want to get back to the earlier idea of adding an argument to FieldStorage?

(One advantage of doc changes is that they can get committed to 2.7, 3.2 and 3.3 and get published immediately.  We can anyway make a code change in 3.3 and a doc change for older versions.)

> As for other use cases for changing the temp directory, I thought
> about letting the user choose the FS of its choice with regard to
> performance or security (crypted FS) or even having the temp files
> created in a directory with 700 permissions.
Excellent use cases.

> I fiddled last night with setting an environment to deploy and test a
> patched Python
Are you aware of the developers’ guide?  http://docs.python.org/devguide/

> (I had some problem to understand what happened when I encountered
> 6755).
What is 6755?
History
Date User Action Args
2011-07-30 13:45:20eric.araujosetrecipients: + eric.araujo, orsenthil, phep
2011-07-30 13:45:20eric.araujosetmessageid: <1312033520.91.0.700156512253.issue9968@psf.upfronthosting.co.za>
2011-07-30 13:45:20eric.araujolinkissue9968 messages
2011-07-30 13:45:18eric.araujocreate