PEP 475: don't deprecate signal.siginterrupt() anymore

This commit is contained in:
Victor Stinner 2014-07-29 23:16:04 +02:00
parent cdacf3fbad
commit db8da56c78
1 changed files with 1 additions and 21 deletions

View File

@ -14,7 +14,7 @@ Abstract
========
Retry system calls failing with the ``EINTR`` error and recompute
timeout if needed. Deprecate the ``signal.siginterrupt()`` function.
timeout if needed.
Rationale
@ -173,23 +173,6 @@ Note: The ``selector`` module already retries on ``InterruptedError``, but it
doesn't recompute the timeout yet.
Deprecate siginterrupt()
------------------------
The function ``signal.siginterrupt()`` becomes useless with this PEP,
it should be deprecated. When ``signal.siginterrupt(signum, False)``
is used, some system calls don't fail with ``EINTR`` when a signal is
received. Python cannot call its signal handler and interrupt the
system call.
The function ``signal.siginterrupt()`` will be deprecated in Python
3.5.
In Python 3.6, calling ``signal.siginterrupt(signum, False)`` will
raise an exception, whereas ``signal.siginterrupt(signum, True)`` will
only emit the deprecation warning.
Backward Compatibility
======================
@ -204,9 +187,6 @@ have a reliable behaviour on all platforms and all Python versions.
For example, use a signal handle which raises an exception, or use a
wakeup file descriptor.
Applications should not call ``signal.siginterrupt(signum, False)``
anymore, since this call will raise an exception in Python 3.6.
For applications using event loops, ``signal.set_wakeup_fd()`` is the
recommanded option to handle signals. The signal handler writes signal
numbers into the file descriptor and the event loop is awaken to read