From 5fa8eff3050d58c649c3567a06c77e86efac2847 Mon Sep 17 00:00:00 2001 From: olen Date: Thu, 14 May 2026 14:45:02 +0200 Subject: [PATCH] fix: pin pytest-asyncio default fixture loop scope (#189) pytest-asyncio's `asyncio_default_fixture_loop_scope` is currently unset and will default to "function" in a future release. Setting it explicitly now pins the behaviour and silences the original deprecation warning that prompted #189. (The literal warning text no longer fires in pytest-asyncio 1.3.0, but the behaviour-drift risk remains until the value is explicit.) --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 82f1121..659366a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,11 @@ pytest = ">=9.0.2" pytest-asyncio = ">=1.3.0" ruff = ">=0.15.0" +[tool.pytest.ini_options] +# Pinned explicitly: pytest-asyncio's default is currently unset and will +# flip to "function" in a future release — set now so behaviour can't drift. +asyncio_default_fixture_loop_scope = "function" + [tool.ruff] target-version = "py310" # Ruff doesn't yet infer this from [tool.poetry.dependencies]