Kaydet (Commit) 56f65260 authored tarafından Victor Stinner's avatar Victor Stinner

os module doc: remove availability when useless

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