Skip to content

Commit

Permalink
Made the wording of the changelog entry for the coroutine -> awaitabl…
Browse files Browse the repository at this point in the history
…e annotation change clearer

Closes agronholm#567.
  • Loading branch information
agronholm committed May 14, 2023
1 parent e579d2c commit 6ba4245
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/versionhistory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ This library adheres to `Semantic Versioning 2.0 <http://semver.org/>`_.
create UNIX datagram sockets (PR by Jean Hominal)
- Improved type annotations:

- Several functions and methods that previously only accepted coroutines as the return
type of the callable have been amended to accept any awaitables:
- Several functions and methods that were previously annotated as accepting
``Coroutine[Any, Any, Any]`` as the return type of the callable have been amended to
accept ``Awaitable[Any]`` instead, to allow a slightly broader set of coroutine-like
inputs, like ``async_generator_asend`` objects returned from the ``asend()`` method
of async generators, and to match the ``trio`` annotations:

- ``anyio.run()``
- ``anyio.from_thread.run()``
Expand All @@ -25,6 +28,9 @@ This library adheres to `Semantic Versioning 2.0 <http://semver.org/>`_.
- ``BlockingPortal.start_task_soon()``
- ``BlockingPortal.start_task()``

Note that this change involved only changing the type annotations; run-time
functionality was not altered.

- The ``TaskStatus`` class is now a generic protocol, and should be parametrized to
indicate the type of the value passed to ``task_status.started()``
- The ``Listener`` class is now covariant in its stream type
Expand Down

0 comments on commit 6ba4245

Please sign in to comment.