mirror of https://github.com/python/cpython.git
os module doc: remove availability when useless
Remove "Availability: Unix, Windows." from os module documentation for functions available on all platforms.
This commit is contained in:
parent
3f6538fed0
commit
56f6526085
|
@ -312,8 +312,6 @@ process and user.
|
|||
|
||||
Return the current process id.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
|
||||
.. function:: getppid()
|
||||
|
||||
|
@ -550,8 +548,6 @@ process and user.
|
|||
On platforms where :c:func:`strerror` returns ``NULL`` when given an unknown
|
||||
error number, :exc:`ValueError` is raised.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
|
||||
.. data:: supports_bytes_environ
|
||||
|
||||
|
@ -565,8 +561,6 @@ process and user.
|
|||
|
||||
Set the current numeric umask and return the previous umask.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
|
||||
.. function:: uname()
|
||||
|
||||
|
@ -657,8 +651,6 @@ as internal buffering of data.
|
|||
|
||||
Close file descriptor *fd*.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. note::
|
||||
|
||||
This function is intended for low-level I/O and must be applied to a file
|
||||
|
@ -678,8 +670,6 @@ as internal buffering of data.
|
|||
except OSError:
|
||||
pass
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
|
||||
.. function:: device_encoding(fd)
|
||||
|
||||
|
@ -696,8 +686,6 @@ as internal buffering of data.
|
|||
2: stderr), the new file descriptor is :ref:`inheritable
|
||||
<fd_inheritance>`.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. versionchanged:: 3.4
|
||||
The new file descriptor is now non-inheritable.
|
||||
|
||||
|
@ -708,8 +696,6 @@ as internal buffering of data.
|
|||
The file descriptor *fd2* is :ref:`inheritable <fd_inheritance>` by default,
|
||||
or non-inheritable if *inheritable* is ``False``.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. versionchanged:: 3.4
|
||||
Add the optional *inheritable* parameter.
|
||||
|
||||
|
@ -775,8 +761,6 @@ as internal buffering of data.
|
|||
|
||||
The :func:`.stat` function.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
|
||||
.. function:: fstatvfs(fd)
|
||||
|
||||
|
@ -860,8 +844,6 @@ as internal buffering of data.
|
|||
current position; :const:`SEEK_END` or ``2`` to set it relative to the end of
|
||||
the file. Return the new cursor position in bytes, starting from the beginning.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
|
||||
.. data:: SEEK_SET
|
||||
SEEK_CUR
|
||||
|
@ -870,8 +852,6 @@ as internal buffering of data.
|
|||
Parameters to the :func:`lseek` function. Their values are 0, 1, and 2,
|
||||
respectively.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
Some operating systems could support additional values, like
|
||||
:data:`os.SEEK_HOLE` or :data:`os.SEEK_DATA`.
|
||||
|
@ -892,8 +872,6 @@ as internal buffering of data.
|
|||
This function can support :ref:`paths relative to directory descriptors
|
||||
<dir_fd>` with the *dir_fd* parameter.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. versionchanged:: 3.4
|
||||
The new file descriptor is now non-inheritable.
|
||||
|
||||
|
@ -1079,8 +1057,6 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
|
|||
bytes read. If the end of the file referred to by *fd* has been reached, an
|
||||
empty bytes object is returned.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. note::
|
||||
|
||||
This function is intended for low-level I/O and must be applied to a file
|
||||
|
@ -1199,8 +1175,6 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
|
|||
Write the bytestring in *str* to file descriptor *fd*. Return the number of
|
||||
bytes actually written.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. note::
|
||||
|
||||
This function is intended for low-level I/O and must be applied to a file
|
||||
|
@ -1376,8 +1350,6 @@ features:
|
|||
or not it is available using :data:`os.supports_effective_ids`. If it is
|
||||
unavailable, using it will raise a :exc:`NotImplementedError`.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. note::
|
||||
|
||||
Using :func:`access` to check if a user is authorized to e.g. open a file
|
||||
|
@ -1430,8 +1402,6 @@ features:
|
|||
This function can support :ref:`specifying a file descriptor <path_fd>`. The
|
||||
descriptor must refer to an opened directory, not an open file.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
Added support for specifying *path* as a file descriptor
|
||||
on some platforms.
|
||||
|
@ -1493,8 +1463,6 @@ features:
|
|||
:ref:`paths relative to directory descriptors <dir_fd>` and :ref:`not
|
||||
following symlinks <follow_symlinks>`.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. note::
|
||||
|
||||
Although Windows supports :func:`chmod`, you can only set the file's
|
||||
|
@ -1545,15 +1513,11 @@ features:
|
|||
|
||||
Return a string representing the current working directory.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
|
||||
.. function:: getcwdb()
|
||||
|
||||
Return a bytestring representing the current working directory.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
|
||||
.. function:: lchflags(path, flags)
|
||||
|
||||
|
@ -1616,8 +1580,6 @@ features:
|
|||
.. note::
|
||||
To encode ``str`` filenames to ``bytes``, use :func:`~os.fsencode`.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. seealso::
|
||||
|
||||
The :func:`scandir` function returns the directory entries with more
|
||||
|
@ -1670,8 +1632,6 @@ features:
|
|||
It is also possible to create temporary directories; see the
|
||||
:mod:`tempfile` module's :func:`tempfile.mkdtemp` function.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
The *dir_fd* argument.
|
||||
|
||||
|
@ -1830,8 +1790,6 @@ features:
|
|||
|
||||
This function is identical to :func:`unlink`.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
The *dir_fd* argument.
|
||||
|
||||
|
@ -1865,8 +1823,6 @@ features:
|
|||
|
||||
If you want cross-platform overwriting of the destination, use :func:`replace`.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
The *src_dir_fd* and *dst_dir_fd* arguments.
|
||||
|
||||
|
@ -1895,8 +1851,6 @@ features:
|
|||
This function can support specifying *src_dir_fd* and/or *dst_dir_fd* to
|
||||
supply :ref:`paths relative to directory descriptors <dir_fd>`.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
|
||||
|
@ -1909,8 +1863,6 @@ features:
|
|||
This function can support :ref:`paths relative to directory descriptors
|
||||
<dir_fd>`.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
The *dir_fd* parameter.
|
||||
|
||||
|
@ -2113,8 +2065,6 @@ features:
|
|||
>>> statinfo.st_size
|
||||
264
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. seealso::
|
||||
|
||||
:func:`fstat` and :func:`lstat` functions.
|
||||
|
@ -2508,8 +2458,6 @@ features:
|
|||
name. Please see the documentation for :func:`remove` for
|
||||
further information.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
The *dir_fd* parameter.
|
||||
|
||||
|
@ -2546,8 +2494,6 @@ features:
|
|||
:ref:`paths relative to directory descriptors <dir_fd>` and :ref:`not
|
||||
following symlinks <follow_symlinks>`.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
Added support for specifying an open file descriptor for *path*,
|
||||
and the *dir_fd*, *follow_symlinks*, and *ns* parameters.
|
||||
|
@ -2799,8 +2745,6 @@ to be ignored.
|
|||
Python signal handler registered for :const:`SIGABRT` with
|
||||
:func:`signal.signal`.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
|
||||
.. function:: execl(path, arg0, arg1, ...)
|
||||
execle(path, arg0, arg1, ..., env)
|
||||
|
@ -2864,8 +2808,6 @@ to be ignored.
|
|||
Exit the process with status *n*, without calling cleanup handlers, flushing
|
||||
stdio buffers, etc.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
|
||||
.. note::
|
||||
|
||||
The standard way to exit is ``sys.exit(n)``. :func:`_exit` should
|
||||
|
|
Loading…
Reference in New Issue