Skip to content

Commit

Permalink
[3.11] gh-101100: Document PyObject_ClearWeakRefs, gzip's name, and a…
Browse files Browse the repository at this point in the history
…syncio.iscoroutine (#103001)
  • Loading branch information
hugovk authored Mar 25, 2023
1 parent a08b65f commit 85c686a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Doc/c-api/weakref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
7 changes: 7 additions & 0 deletions Doc/library/asyncio-task.rst
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,13 @@ Introspection
.. versionadded:: 3.7


.. function:: iscoroutine(obj)

Return ``True`` if *obj* is a coroutine object.

.. versionadded:: 3.4


Task Object
===========

Expand Down
6 changes: 6 additions & 0 deletions Doc/library/gzip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 85c686a

Please sign in to comment.