Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/versionhistory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ This library adheres to `Semantic Versioning 2.0 <http://semver.org/>`_.
this prevents an OSError on the ``ProactorEventLoop``.
(`#896 <https://github.com/agronholm/anyio/pull/896>`_; PR by @graingert)
- Fixed ``anyio.Path.copy()`` and ``anyio.Path.copy_into()`` failing on Python 3.14.0a7
- Fixed return annotation of ``__aexit__`` on async context managers. CMs which can
suppress exceptions should return ``bool``, or ``None`` otherwise.
(`#913 <https://github.com/agronholm/anyio/pull/913>`_; PR by @Enegg)

**4.9.0**

Expand Down
2 changes: 1 addition & 1 deletion src/anyio/_backends/_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ async def __aexit__(
exc_type: type[BaseException] | None,
exc_val: BaseException | None,
exc_tb: TracebackType | None,
) -> bool | None:
) -> bool:
try:
if exc_val is not None:
self.cancel_scope.cancel()
Expand Down
4 changes: 2 additions & 2 deletions src/anyio/_core/_synchronization.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ async def __aexit__(
exc_type: type[BaseException] | None,
exc_val: BaseException | None,
exc_tb: TracebackType | None,
) -> bool | None:
) -> None:
raise NotImplementedError

@property
Expand Down Expand Up @@ -630,7 +630,7 @@ async def __aexit__(
exc_type: type[BaseException] | None,
exc_val: BaseException | None,
exc_tb: TracebackType | None,
) -> bool | None:
) -> None:
return await self._limiter.__aexit__(exc_type, exc_val, exc_tb)

@property
Expand Down
2 changes: 1 addition & 1 deletion src/anyio/abc/_sockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def __aexit__(
exc_type: type[BaseException] | None,
exc_val: BaseException | None,
exc_tb: TracebackType | None,
) -> bool | None:
) -> None:
return None


Expand Down
2 changes: 1 addition & 1 deletion src/anyio/abc/_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,5 @@ async def __aexit__(
exc_type: type[BaseException] | None,
exc_val: BaseException | None,
exc_tb: TracebackType | None,
) -> bool | None:
) -> bool:
"""Exit the task group context waiting for all tasks to finish."""
2 changes: 1 addition & 1 deletion src/anyio/from_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ async def __aexit__(
exc_type: type[BaseException] | None,
exc_val: BaseException | None,
exc_tb: TracebackType | None,
) -> bool | None:
) -> bool:
await self.stop()
return await self._task_group.__aexit__(exc_type, exc_val, exc_tb)

Expand Down