Skip to content

Commit 4594072

Browse files
committed
mention ASYNC124 in docs/usage.rst, and convert mentions of PEP to :pep:
1 parent 7f7d1cb commit 4594072

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ Changelog
225225

226226
22.9.2
227227
======
228-
- Fix a crash on nontrivial decorator expressions (calls, PEP-614) and document behavior.
228+
- Fix a crash on nontrivial decorator expressions (calls, :pep:`614`) and document behavior.
229229

230230
22.9.1
231231
======

docs/rules.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ _`ASYNC100` : cancel-scope-no-checkpoint
1818
ASYNC101 : yield-in-cancel-scope
1919
``yield`` inside a :ref:`taskgroup_nursery` or :ref:`timeout_context` is only safe when implementing a context manager - otherwise, it breaks exception handling.
2020
See `this thread <https://discuss.python.org/t/preventing-yield-inside-certain-context-managers/1091/23>`_ for discussion of a future PEP.
21-
This has substantial overlap with :ref:`ASYNC119 <ASYNC119>`, which will warn on almost all instances of ASYNC101, but ASYNC101 is about a conceptually different problem that will not get resolved by `PEP 533 <https://peps.python.org/pep-0533/>`_.
21+
This has substantial overlap with :ref:`ASYNC119 <ASYNC119>`, which will warn on almost all instances of ASYNC101, but ASYNC101 is about a conceptually different problem that will not get resolved by :pep:`533`.
2222

2323
_`ASYNC102` : await-in-finally-or-cancelled
2424
``await`` inside ``finally``, :ref:`cancelled-catching <cancelled>` ``except:``, or ``__aexit__`` must have shielded :ref:`cancel scope <cancel_scope>` with timeout.
@@ -75,7 +75,7 @@ ASYNC118 : cancelled-class-saved
7575

7676
_`ASYNC119` : yield-in-cm-in-async-gen
7777
``yield`` in context manager in async generator is unsafe, the cleanup may be delayed until ``await`` is no longer allowed.
78-
We strongly encourage you to read `PEP 533 <https://peps.python.org/pep-0533/>`_ and use `async with aclosing(...) <https://docs.python.org/3/library/contextlib.html#contextlib.aclosing>`_, or better yet avoid async generators entirely (see `ASYNC900`_ ) in favor of context managers which return an iterable :ref:`channel/stream/queue <channel_stream_queue>`.
78+
We strongly encourage you to read :pep:`533` and use `async with aclosing(...) <https://docs.python.org/3/library/contextlib.html#contextlib.aclosing>`_, or better yet avoid async generators entirely (see `ASYNC900`_ ) in favor of context managers which return an iterable :ref:`channel/stream/queue <channel_stream_queue>`.
7979

8080
_`ASYNC120` : await-in-except
8181
Dangerous :ref:`checkpoint` inside an ``except`` block.

docs/usage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,11 @@ Example
215215
``no-checkpoint-warning-decorators``
216216
------------------------------------
217217

218-
Comma-separated list of decorators to disable checkpointing checks for, turning off :ref:`ASYNC910 <async910>` and :ref:`ASYNC911 <async911>` warnings for functions decorated with any decorator matching against an entry in the list.
218+
Comma-separated list of decorators to disable checkpointing checks for, turning off :ref:`ASYNC910 <async910>`, :ref:`ASYNC911 <async911>`, and :ref:`ASYNC124 <async124>` warnings for functions decorated with any decorator matching against an entry in the list.
219219
Matching is done with `fnmatch <https://docs.python.org/3/library/fnmatch.html>`_.
220220
Defaults to disabling for ``asynccontextmanager``.
221221

222-
Decorators-to-match must be identifiers or dotted names only (not PEP-614 expressions), and will match against the name only - e.g. ``foo.bar`` matches ``foo.bar``, ``foo.bar()``, and ``foo.bar(args, here)``, etc.
222+
Decorators-to-match must be identifiers or dotted names only (not :pep:`614` expressions), and will match against the name only - e.g. ``foo.bar`` matches ``foo.bar``, ``foo.bar()``, and ``foo.bar(args, here)``, etc.
223223

224224
Example
225225
^^^^^^^

0 commit comments

Comments
 (0)