pytest-dev / pytest-dev/pytest-asyncio

Finish deprecation of unset asyncio_default_fixture_loop_scope

Open
#924 20 comments 22 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Python
Stars
1.7k
Forks
207
Avg merge
5h 35m
Merged PRs (30d)
9

Description

Pytest-asyncio v0.24 introduced the configuration option asyncio_default_fixture_loop_scope which controls the event loop in which async fixtures are run. In order to allow partial migration of test suites, users have the option to leave the option unset. In this case, the event loop scope of async fixtures defaults to the fixture caching scope, unless explicitly specified. However, when asyncio_default_fixture_loop_scope is unset, pytest-asyncio will emit a deprecation warning.

The goal of this issue is to remove the option to have asyncio_default_fixture_loop_scope unset. The default value should be funciton. The pytest-asyncio test suite should be adjusted accordingly, so that asyncio_default_fixture_loop_scope is not set explicitly, unless necessary.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the configuration handling for asyncio_default_fixture_loop_scope and the pytest-asyncio test suite that covers async fixture loop scopes. Check how an unset option currently behaves, then update the default and adjust tests so the option is not set explicitly unless necessary; the suite should pass without the deprecation path.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.