pytest-dev / pytest-dev/pytest-asyncio

Turn deprecation of applying `@pytest.fixture` to async fixtures in strict mode into an error

Open
#1,202 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Pytest-asyncio emits a deprecation warning when an async fixture is decorated with @pytest.fixture in strict mode as v0.25 (see #979).

The goal of this issue is to follow through with the deprecation and convert the warning into an error.

This is a breaking change that involves a major version bump to pytest-asyncio.

Please note that the the same behavior has been deprecated in pytest v8.4.0 and will be removed in pytest v9. This means there's a connection to the minimum supported pytest version.

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 tracing the strict-mode deprecation introduced for #979 and the current warning path. Check how pytest-asyncio handles its minimum supported pytest version, including pytest 8.4. Done means applying @pytest.fixture to an async fixture in strict mode raises an error and the release receives the required major version bump.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.