Skip to content

Remove deprecated event_loop_policy fixture#1517

Open
seifertm wants to merge 2 commits into
pytest-dev:mainfrom
seifertm:remove-event-loop-policy
Open

Remove deprecated event_loop_policy fixture#1517
seifertm wants to merge 2 commits into
pytest-dev:mainfrom
seifertm:remove-event-loop-policy

Conversation

@seifertm

Copy link
Copy Markdown
Contributor

The asyncio policy system has been deprecated and is scheduled for removal in CPython 3.16. The pytest-asyncio policy system is deprecated and has been superseeded by the pytest_asyncio_loop_factory hook.

This PR removes the deprecated event_loop_policy fixture.

Obsoletes #796

@seifertm
seifertm requested review from Tinche and asvetlov as code owners July 21, 2026 13:03
@seifertm
seifertm requested review from tjkuson and removed request for Tinche and asvetlov July 21, 2026 13:03
@seifertm
seifertm force-pushed the remove-event-loop-policy branch from e658814 to ba9c3f8 Compare July 21, 2026 13:06
@seifertm seifertm added this to the v2.0 milestone Jul 21, 2026
@codecov-commenter

codecov-commenter commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.42%. Comparing base (054a52d) to head (2ac8576).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1517      +/-   ##
==========================================
- Coverage   94.50%   94.42%   -0.09%     
==========================================
  Files           2        2              
  Lines         510      502       -8     
  Branches       62       61       -1     
==========================================
- Hits          482      474       -8     
  Misses         22       22              
  Partials        6        6              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

seifertm added 2 commits July 21, 2026 15:41
The function no longer needs the event loop policy to be passed as an argument. It always restores the currently installed policy.
@seifertm
seifertm force-pushed the remove-event-loop-policy branch from ba9c3f8 to 2ac8576 Compare July 21, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants