Skip to content

Commit 23234e9

Browse files
authored
[3.11] gh-101100: Fix Sphinx nits in library/contextlib.rst (#112870) (#112874)
(cherry-picked from commit e4c0876)
1 parent 161cfd0 commit 23234e9

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

Doc/library/contextlib.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ Functions and classes provided:
106106

107107
This function is a :term:`decorator` that can be used to define a factory
108108
function for :keyword:`async with` statement asynchronous context managers,
109-
without needing to create a class or separate :meth:`__aenter__` and
110-
:meth:`__aexit__` methods. It must be applied to an :term:`asynchronous
109+
without needing to create a class or separate :meth:`~object.__aenter__` and
110+
:meth:`~object.__aexit__` methods. It must be applied to an :term:`asynchronous
111111
generator` function.
112112

113113
A simple example::
@@ -609,12 +609,12 @@ Functions and classes provided:
609609
asynchronous context managers, as well as having coroutines for
610610
cleanup logic.
611611

612-
The :meth:`close` method is not implemented, :meth:`aclose` must be used
612+
The :meth:`~ExitStack.close` method is not implemented; :meth:`aclose` must be used
613613
instead.
614614

615615
.. coroutinemethod:: enter_async_context(cm)
616616

617-
Similar to :meth:`enter_context` but expects an asynchronous context
617+
Similar to :meth:`ExitStack.enter_context` but expects an asynchronous context
618618
manager.
619619

620620
.. versionchanged:: 3.11
@@ -623,16 +623,16 @@ Functions and classes provided:
623623

624624
.. method:: push_async_exit(exit)
625625

626-
Similar to :meth:`push` but expects either an asynchronous context manager
626+
Similar to :meth:`ExitStack.push` but expects either an asynchronous context manager
627627
or a coroutine function.
628628

629629
.. method:: push_async_callback(callback, /, *args, **kwds)
630630

631-
Similar to :meth:`callback` but expects a coroutine function.
631+
Similar to :meth:`ExitStack.callback` but expects a coroutine function.
632632

633633
.. coroutinemethod:: aclose()
634634

635-
Similar to :meth:`close` but properly handles awaitables.
635+
Similar to :meth:`ExitStack.close` but properly handles awaitables.
636636

637637
Continuing the example for :func:`asynccontextmanager`::
638638

Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ Doc/library/collections.abc.rst
3939
Doc/library/collections.rst
4040
Doc/library/concurrent.futures.rst
4141
Doc/library/configparser.rst
42-
Doc/library/contextlib.rst
4342
Doc/library/copy.rst
4443
Doc/library/csv.rst
4544
Doc/library/ctypes.rst

0 commit comments

Comments
 (0)