aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Doc/library/exceptions.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/exceptions.rst')
-rw-r--r--Doc/library/exceptions.rst13
1 files changed, 10 insertions, 3 deletions
diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst
index 4b391ba020a..c09e1615a5b 100644
--- a/Doc/library/exceptions.rst
+++ b/Doc/library/exceptions.rst
@@ -429,17 +429,24 @@ The following exceptions are the exceptions that are usually raised.
* Creating a new Python thread.
* :meth:`Joining <threading.Thread.join>` a running daemon thread.
- * :func:`os.fork`.
+ * :func:`os.fork`,
+ * acquiring a lock such as :class:`threading.Lock`, when it is known that
+ the operation would otherwise deadlock.
See also the :func:`sys.is_finalizing` function.
.. versionadded:: 3.13
Previously, a plain :exc:`RuntimeError` was raised.
- .. versionchanged:: next
+ .. versionchanged:: 3.14
:meth:`threading.Thread.join` can now raise this exception.
+ .. versionchanged:: next
+
+ This exception may be raised when acquiring :meth:`threading.Lock`
+ or :meth:`threading.RLock`.
+
.. exception:: RecursionError
This exception is derived from :exc:`RuntimeError`. It is raised when the
@@ -1048,7 +1055,7 @@ their subgroups based on the types of the contained exceptions.
subclasses that need a different constructor signature need to
override that rather than :meth:`~object.__init__`. For example, the following
defines an exception group subclass which accepts an exit_code and
- and constructs the group's message from it. ::
+ constructs the group's message from it. ::
class Errors(ExceptionGroup):
def __new__(cls, errors, exit_code):