PEP 475: don't deprecate signal.siginterrupt() anymore
This commit is contained in:
parent
cdacf3fbad
commit
db8da56c78
22
pep-0475.txt
22
pep-0475.txt
|
@ -14,7 +14,7 @@ Abstract
|
||||||
========
|
========
|
||||||
|
|
||||||
Retry system calls failing with the ``EINTR`` error and recompute
|
Retry system calls failing with the ``EINTR`` error and recompute
|
||||||
timeout if needed. Deprecate the ``signal.siginterrupt()`` function.
|
timeout if needed.
|
||||||
|
|
||||||
|
|
||||||
Rationale
|
Rationale
|
||||||
|
@ -173,23 +173,6 @@ Note: The ``selector`` module already retries on ``InterruptedError``, but it
|
||||||
doesn't recompute the timeout yet.
|
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
|
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
|
For example, use a signal handle which raises an exception, or use a
|
||||||
wakeup file descriptor.
|
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
|
For applications using event loops, ``signal.set_wakeup_fd()`` is the
|
||||||
recommanded option to handle signals. The signal handler writes signal
|
recommanded option to handle signals. The signal handler writes signal
|
||||||
numbers into the file descriptor and the event loop is awaken to read
|
numbers into the file descriptor and the event loop is awaken to read
|
||||||
|
|
Loading…
Reference in New Issue