summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-10-25 23:18:51 (GMT)
committerGuido van Rossum <guido@python.org>2007-10-25 23:18:51 (GMT)
commit687b9c0779d81714d8ad22157e8e0f5dfc88d904 (patch)
treee0d57e898a6ff10393d68862649d5538a328d71a /Doc/library
parentedbcc1332f9d8e09fc7f511b6122c06b8dbd49c5 (diff)
downloadcpython-687b9c0779d81714d8ad22157e8e0f5dfc88d904.zip
cpython-687b9c0779d81714d8ad22157e8e0f5dfc88d904.tar.gz
cpython-687b9c0779d81714d8ad22157e8e0f5dfc88d904.tar.bz2
Patch 1318 by Christian Heimes: remove os.tmpnam(), os.tempnam(),
and os.tmpfile().
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/os.rst55
1 files changed, 0 insertions, 55 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 2d87d8c..b5f2bdf 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -371,14 +371,6 @@ These functions create new file objects. (See also :func:`open`.)
This function is obsolete. Use the :mod:`subprocess` module.
-.. function:: tmpfile()
-
- Return a new file object opened in update mode (``w+b``). The file has no
- directory entries associated with it and will be automatically deleted once
- there are no file descriptors for the file. Availability: Macintosh, Unix,
- Windows.
-
-
.. _os-fd-ops:
File Descriptor Operations
@@ -1077,53 +1069,6 @@ Files and Directories
Create a symbolic link pointing to *src* named *dst*. Availability: Unix.
-.. function:: tempnam([dir[, prefix]])
-
- Return a unique path name that is reasonable for creating a temporary file.
- This will be an absolute path that names a potential directory entry in the
- directory *dir* or a common location for temporary files if *dir* is omitted or
- ``None``. If given and not ``None``, *prefix* is used to provide a short prefix
- to the filename. Applications are responsible for properly creating and
- managing files created using paths returned by :func:`tempnam`; no automatic
- cleanup is provided. On Unix, the environment variable :envvar:`TMPDIR`
- overrides *dir*, while on Windows the :envvar:`TMP` is used. The specific
- behavior of this function depends on the C library implementation; some aspects
- are underspecified in system documentation.
-
- .. warning::
-
- Use of :func:`tempnam` is vulnerable to symlink attacks; consider using
- :func:`tmpfile` (section :ref:`os-newstreams`) instead.
-
- Availability: Macintosh, Unix, Windows.
-
-
-.. function:: tmpnam()
-
- Return a unique path name that is reasonable for creating a temporary file.
- This will be an absolute path that names a potential directory entry in a common
- location for temporary files. Applications are responsible for properly
- creating and managing files created using paths returned by :func:`tmpnam`; no
- automatic cleanup is provided.
-
- .. warning::
-
- Use of :func:`tmpnam` is vulnerable to symlink attacks; consider using
- :func:`tmpfile` (section :ref:`os-newstreams`) instead.
-
- Availability: Unix, Windows. This function probably shouldn't be used on
- Windows, though: Microsoft's implementation of :func:`tmpnam` always creates a
- name in the root directory of the current drive, and that's generally a poor
- location for a temp file (depending on privileges, you may not even be able to
- open a file using this name).
-
-
-.. data:: TMP_MAX
-
- The maximum number of unique names that :func:`tmpnam` will generate before
- reusing names.
-
-
.. function:: unlink(path)
Remove the file *path*. This is the same function as :func:`remove`; the