Author: Preston Timmons <prestontimm...@gmail.com> Branch: py3k Changeset: r53572:9fb85478f6e6 Date: 2012-03-13 19:26 +0000 http://bitbucket.org/pypy/pypy/changeset/9fb85478f6e6/
Log: Removed tmpfile, tmpnam, and tempnam from the posix_app as well. That should be everywhere. diff --git a/pypy/module/posix/app_posix.py b/pypy/module/posix/app_posix.py --- a/pypy/module/posix/app_posix.py +++ b/pypy/module/posix/app_posix.py @@ -78,39 +78,6 @@ # XXX for the moment return -def tmpfile(): - """Create a temporary file. - - The data in the file is freed when you - close the file, or automatically by the OS when the program ends.""" - import tempfile - f = tempfile.TemporaryFile() - if osname == 'nt': - f = f.file # on NT, with the 2.4 stdlib of CPython, - # we get a _TemporaryFileWrapper for no good reason - return f - - -def tmpnam(): - """Return an absolute pathname of a file that did not exist at the - time the call is made.""" - from warnings import warn - warn(RuntimeWarning("tmpnam is a potential security risk to your program")) - - import tempfile - return tempfile.mktemp() - -def tempnam(dir=None, prefix=None): - """Return an absolute pathname of a file that did not exist at the - time the call is made. The directory and a prefix may be specified - as strings; they may be omitted or None if not needed.""" - from warnings import warn - warn(RuntimeWarning("tempnam is a potential security risk to your program")) - - import tempfile - return tempfile.mktemp('', prefix or 'tmp', dir) - - if osname == 'posix': def wait(): """ wait() -> (pid, status) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit