Skip to content

Commit

Permalink
Fixed TaskGroup and CancelScope exit issues on asyncio (#774)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ganden Schaffner <gschaffner@pm.me>
  • Loading branch information
3 people committed Sep 21, 2024
1 parent 7f35ce7 commit 01a37c6
Show file tree
Hide file tree
Showing 22 changed files with 427 additions and 209 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", pypy-3.10]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", pypy-3.10]
include:
- os: macos-latest
python-version: "3.8"
python-version: "3.9"
- os: macos-latest
python-version: "3.12"
- os: windows-latest
python-version: "3.8"
python-version: "3.9"
- os: windows-latest
python-version: "3.12"
runs-on: ${{ matrix.os }}
Expand Down
16 changes: 16 additions & 0 deletions docs/versionhistory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ Version history

This library adheres to `Semantic Versioning 2.0 <http://semver.org/>`_.

**UNRELEASED**

- Dropped support for Python 3.8
(as `#698 <https://github.com/agronholm/anyio/issues/698>`_ cannot be resolved
without cancel message support)
- Fixed 100% CPU use on asyncio while waiting for an exiting task group to finish while
said task group is within a cancelled cancel scope
(`#695 <https://github.com/agronholm/anyio/issues/695>`_)
- Fixed cancel scopes on asyncio not reraising ``CancelledError`` on exit while the
enclosing cancel scope has been effectively cancelled
(`#698 <https://github.com/agronholm/anyio/issues/698>`_)
- Fixed asyncio task groups not yielding control to the event loop at exit if there were
no child tasks to wait on
- Fixed inconsistent task uncancellation with asyncio cancel scopes belonging to a
task group when said task group has child tasks running

**4.5.0**

- Improved the performance of ``anyio.Lock`` and ``anyio.Semaphore`` on asyncio (even up
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ classifiers = [
"Typing :: Typed",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
requires-python = ">= 3.8"
requires-python = ">= 3.9"
dependencies = [
"exceptiongroup >= 1.0.2; python_version < '3.11'",
"idna >= 2.8",
Expand Down Expand Up @@ -128,7 +127,7 @@ show_missing = true
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = pre-commit, py38, py39, py310, py311, py312, py313, pypy3
envlist = pre-commit, py39, py310, py311, py312, py313, pypy3
skip_missing_interpreters = true
minversion = 4.0.0
Expand Down
Loading

0 comments on commit 01a37c6

Please sign in to comment.