]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-101100: Document PyObject_ClearWeakRefs, gzip's name, and asyncio.iscorouti...
authorHugo van Kemenade <hugovk@users.noreply.github.com>
Sat, 25 Mar 2023 07:43:52 +0000 (09:43 +0200)
committerGitHub <noreply@github.com>
Sat, 25 Mar 2023 07:43:52 +0000 (09:43 +0200)
Doc/c-api/weakref.rst
Doc/library/asyncio-task.rst
Doc/library/gzip.rst

index ace743ba01c5f57f013e60e6b42f5dae989daf9e..f27ec4411b4a2610299dcf84e554d54f14a294ff 100644 (file)
@@ -67,3 +67,13 @@ as much as it can.
 .. c:function:: PyObject* PyWeakref_GET_OBJECT(PyObject *ref)
 
    Similar to :c:func:`PyWeakref_GetObject`, but does no error checking.
+
+
+.. c:function:: void PyObject_ClearWeakRefs(PyObject *object)
+
+   This function is called by the :c:member:`~PyTypeObject.tp_dealloc` handler
+   to clear weak references.
+
+   This iterates through the weak references for *object* and calls callbacks
+   for those references which have one. It returns when all callbacks have
+   been attempted.
index 1e0a69c75e258607ccce9f94b6cb55d7e007738b..02fc38495879ccae83e435bf59cc3e35747179f7 100644 (file)
@@ -956,6 +956,13 @@ Introspection
    .. versionadded:: 3.7
 
 
+.. function:: iscoroutine(obj)
+
+   Return ``True`` if *obj* is a coroutine object.
+
+   .. versionadded:: 3.4
+
+
 Task Object
 ===========
 
index 8cea2649ee6cb6d3c0bf5cf7140dcd4b1996a04e..9afaf86cb132814c1bae1d29f26b3d10bc360d8b 100644 (file)
@@ -143,6 +143,12 @@ The module defines the following items:
       :func:`time.time` and the :attr:`~os.stat_result.st_mtime` attribute of
       the object returned by :func:`os.stat`.
 
+   .. attribute:: name
+
+      The path to the gzip file on disk, as a :class:`str` or :class:`bytes`.
+      Equivalent to the output of :func:`os.fspath` on the original input path,
+      with no other normalization, resolution or expansion.
+
    .. versionchanged:: 3.1
       Support for the :keyword:`with` statement was added, along with the
       *mtime* constructor argument and :attr:`mtime` attribute.