Skip to content

Commit 85c686a

Browse files
authored
[3.11] gh-101100: Document PyObject_ClearWeakRefs, gzip's name, and asyncio.iscoroutine (#103001)
1 parent a08b65f commit 85c686a

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

Doc/c-api/weakref.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,13 @@ as much as it can.
6767
.. c:function:: PyObject* PyWeakref_GET_OBJECT(PyObject *ref)
6868
6969
Similar to :c:func:`PyWeakref_GetObject`, but does no error checking.
70+
71+
72+
.. c:function:: void PyObject_ClearWeakRefs(PyObject *object)
73+
74+
This function is called by the :c:member:`~PyTypeObject.tp_dealloc` handler
75+
to clear weak references.
76+
77+
This iterates through the weak references for *object* and calls callbacks
78+
for those references which have one. It returns when all callbacks have
79+
been attempted.

Doc/library/asyncio-task.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,13 @@ Introspection
956956
.. versionadded:: 3.7
957957

958958

959+
.. function:: iscoroutine(obj)
960+
961+
Return ``True`` if *obj* is a coroutine object.
962+
963+
.. versionadded:: 3.4
964+
965+
959966
Task Object
960967
===========
961968

Doc/library/gzip.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ The module defines the following items:
143143
:func:`time.time` and the :attr:`~os.stat_result.st_mtime` attribute of
144144
the object returned by :func:`os.stat`.
145145

146+
.. attribute:: name
147+
148+
The path to the gzip file on disk, as a :class:`str` or :class:`bytes`.
149+
Equivalent to the output of :func:`os.fspath` on the original input path,
150+
with no other normalization, resolution or expansion.
151+
146152
.. versionchanged:: 3.1
147153
Support for the :keyword:`with` statement was added, along with the
148154
*mtime* constructor argument and :attr:`mtime` attribute.

0 commit comments

Comments
 (0)