Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Doc/c-api/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -499,12 +499,12 @@ Querying the error indicator
.. c:function:: void PyErr_SetRaisedException(PyObject *exc)

Set *exc* as the exception currently being raised,
clearing the existing exception if one is set.
clearing the existing exception if one is set. If *exc* is ``NULL``,
just clear the existing exception.

.. warning::
*exc* must be a valid exception or ``NULL``.

This call ":term:`steals <steal>`" a reference to *exc*,
which must be a valid exception.
This call ":term:`steals <steal>`" a reference to *exc*.

.. versionadded:: 3.12

Expand Down
11 changes: 11 additions & 0 deletions Doc/library/os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,7 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
- :data:`RWF_APPEND`
- :data:`RWF_DONTCACHE`
- :data:`RWF_ATOMIC`
- :data:`RWF_NOSIGNAL`

Return the total number of bytes actually written.

Expand Down Expand Up @@ -1691,6 +1692,16 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
.. versionadded:: 3.10


.. data:: RWF_NOSIGNAL

Prevent pipe and socket writes from raising :const:`~signal.SIGPIPE`.
This flag is meaningful only for :func:`os.pwritev`.

.. availability:: Linux >= 6.18.

.. versionadded:: 3.16


.. function:: read(fd, n, /)

Read at most *n* bytes from file descriptor *fd*.
Expand Down
4 changes: 4 additions & 0 deletions Doc/library/uu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ This module is no longer part of the Python standard library.
It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after
being deprecated in Python 3.11. The removal was decided in :pep:`594`.

Encoding and decoding in the uu format can instead be achieved using
:func:`codecs.encode` and :func:`codecs.decode`, specifying ``"uu"``
as the encoding.

The last version of Python that provided the :mod:`!uu` module was
`Python 3.12 <https://docs.python.org/3.12/library/uu.html>`_.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add :data:`os.RWF_NOSIGNAL` constant for Linux 6.18+.
3 changes: 2 additions & 1 deletion Modules/clinic/posixmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -12941,14 +12941,15 @@ following flags:
- RWF_APPEND
- RWF_DONTCACHE
- RWF_ATOMIC
- RWF_NOSIGNAL

Using non-zero flags requires Linux 4.7 or newer.
[clinic start generated code]*/

static Py_ssize_t
os_pwritev_impl(PyObject *module, int fd, PyObject *buffers, Py_off_t offset,
int flags)
/*[clinic end generated code: output=e3dd3e9d11a6a5c7 input=b2e352a22f030e9a]*/
/*[clinic end generated code: output=e3dd3e9d11a6a5c7 input=c202f24f01fa66c9]*/
{
Py_ssize_t cnt;
Py_ssize_t result;
Expand Down Expand Up @@ -18246,6 +18247,9 @@ all_ins(PyObject *m)
#ifdef RWF_APPEND
if (PyModule_AddIntConstant(m, "RWF_APPEND", RWF_APPEND)) return -1;
#endif
#ifdef RWF_NOSIGNAL
if (PyModule_AddIntConstant(m, "RWF_NOSIGNAL", RWF_NOSIGNAL)) return -1;
#endif

/* constants for splice */
#if defined(HAVE_SPLICE) && defined(__linux__)
Expand Down
Loading