From 0d3b52712e73acc8d1f706e1aabaac2030538c45 Mon Sep 17 00:00:00 2001 From: Christoph Anton Mitterer Date: Mon, 14 Aug 2023 03:47:33 +0200 Subject: [PATCH 1/2] gh-107924: re-order `os.sendfile()` flag documentation Signed-off-by: Christoph Anton Mitterer --- Doc/library/os.rst | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 9735baa5bc0f3a..be73bbd3fa97b1 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1578,25 +1578,6 @@ or `the MSDN `_ on Windo Parameters *out* and *in* was renamed to *out_fd* and *in_fd*. -.. function:: set_blocking(fd, blocking, /) - - Set the blocking mode of the specified file descriptor. Set the - :data:`O_NONBLOCK` flag if blocking is ``False``, clear the flag otherwise. - - See also :func:`get_blocking` and :meth:`socket.socket.setblocking`. - - .. availability:: Unix, Windows. - - The function is limited on Emscripten and WASI, see - :ref:`wasm-availability` for more information. - - On Windows, this function is limited to pipes. - - .. versionadded:: 3.5 - - .. versionchanged:: 3.12 - Added support for pipes on Windows. - .. data:: SF_NODISKIO SF_MNOWAIT SF_SYNC @@ -1608,6 +1589,7 @@ or `the MSDN `_ on Windo .. versionadded:: 3.3 + .. data:: SF_NOCACHE Parameter to the :func:`sendfile` function, if the implementation supports @@ -1618,6 +1600,26 @@ or `the MSDN `_ on Windo .. versionadded:: 3.11 +.. function:: set_blocking(fd, blocking, /) + + Set the blocking mode of the specified file descriptor. Set the + :data:`O_NONBLOCK` flag if blocking is ``False``, clear the flag otherwise. + + See also :func:`get_blocking` and :meth:`socket.socket.setblocking`. + + .. availability:: Unix, Windows. + + The function is limited on Emscripten and WASI, see + :ref:`wasm-availability` for more information. + + On Windows, this function is limited to pipes. + + .. versionadded:: 3.5 + + .. versionchanged:: 3.12 + Added support for pipes on Windows. + + .. function:: splice(src, dst, count, offset_src=None, offset_dst=None) Transfer *count* bytes from file descriptor *src*, starting from offset From 24fc0c659f20f088504e2528125eff26c33ff6f1 Mon Sep 17 00:00:00 2001 From: Christoph Anton Mitterer Date: Tue, 22 Aug 2023 01:14:34 +0200 Subject: [PATCH 2/2] don't align the whitespace as part of this PR --- Doc/library/os.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index be73bbd3fa97b1..17e770ddea2e7f 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1589,7 +1589,6 @@ or `the MSDN `_ on Windo .. versionadded:: 3.3 - .. data:: SF_NOCACHE Parameter to the :func:`sendfile` function, if the implementation supports