From 653584a761097fe7ca07c24b9b9c08d915abfc46 Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Mon, 2 Nov 2026 13:46:53 -0700 Subject: [PATCH 1/2] Fix missing anyio test dependency in official CI Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- eng/templates/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/templates/build.yml b/eng/templates/build.yml index 6c4f8e40..14345025 100644 --- a/eng/templates/build.yml +++ b/eng/templates/build.yml @@ -32,7 +32,7 @@ jobs: # the missing dep instead of being silently masked. - script: | python -m pip install --upgrade pip - python -m pip install build flake8 pytest pytest-asyncio + python -m pip install build flake8 pytest pytest-asyncio anyio displayName: "Install build tooling" # Lint core SDK @@ -78,7 +78,7 @@ jobs: # intentional: if a wheel ever accidentally drops a declared # dependency, this step will surface the missing dependency at install # or test time instead of being masked by a preinstalled - # requirements.txt. Test-only tools (pytest, pytest-asyncio) are + # requirements.txt. Test-only tools (pytest, pytest-asyncio, anyio) are # already installed in the "Install build tooling" step above. # # >>> MAINTENANCE NOTE <<< From 327d45dc3f31380ad7cdaf6268e87a58fc066ee7 Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Mon, 2 Nov 2026 13:58:03 -0700 Subject: [PATCH 2/2] Replace AnyIO test task group with asyncio Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- eng/templates/build.yml | 4 ++-- requirements.txt | 1 - tests/durabletask/test_orchestration_generator_cleanup.py | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/eng/templates/build.yml b/eng/templates/build.yml index 14345025..6c4f8e40 100644 --- a/eng/templates/build.yml +++ b/eng/templates/build.yml @@ -32,7 +32,7 @@ jobs: # the missing dep instead of being silently masked. - script: | python -m pip install --upgrade pip - python -m pip install build flake8 pytest pytest-asyncio anyio + python -m pip install build flake8 pytest pytest-asyncio displayName: "Install build tooling" # Lint core SDK @@ -78,7 +78,7 @@ jobs: # intentional: if a wheel ever accidentally drops a declared # dependency, this step will surface the missing dependency at install # or test time instead of being masked by a preinstalled - # requirements.txt. Test-only tools (pytest, pytest-asyncio, anyio) are + # requirements.txt. Test-only tools (pytest, pytest-asyncio) are # already installed in the "Install build tooling" step above. # # >>> MAINTENANCE NOTE <<< diff --git a/requirements.txt b/requirements.txt index 2e0a5d7e..b41a0e2f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,6 @@ grpcio>=1.60.0 # 1.60.0 is the version introducing protobuf 1.25.X support, newe protobuf pytest pytest-asyncio -anyio pytest-cov azure-identity azure-functions diff --git a/tests/durabletask/test_orchestration_generator_cleanup.py b/tests/durabletask/test_orchestration_generator_cleanup.py index 5c1e17e8..80adfd3e 100644 --- a/tests/durabletask/test_orchestration_generator_cleanup.py +++ b/tests/durabletask/test_orchestration_generator_cleanup.py @@ -10,7 +10,6 @@ from unittest.mock import Mock from weakref import ReferenceType, ref -import anyio import pytest from durabletask import task, worker @@ -428,7 +427,7 @@ async def body(): await anext(opened_resource) references["asyncgen"] = ref(opened_resource) try: - async with anyio.create_task_group(): + async with asyncio.TaskGroup(): await asyncio.Future() finally: await asyncio.sleep(0)