Skip to content

Deprecate event_loop_policy fixture#1421

Merged
seifertm merged 2 commits intopytest-dev:mainfrom
tjkuson:deprecate-hook
Apr 25, 2026
Merged

Deprecate event_loop_policy fixture#1421
seifertm merged 2 commits intopytest-dev:mainfrom
tjkuson:deprecate-hook

Conversation

@tjkuson
Copy link
Copy Markdown
Contributor

@tjkuson tjkuson commented Apr 19, 2026

Emit a deprecation warning when a user uses the event_loop_policy fixture (determined by the hook __module__). Add deprecation notice to documentation.

One documentation code snippet tests was failing due to the change. As I was about to update it, I noticed that the snippet wasn't actually used anywhere, so I deleted it.

Closes #1419

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.56%. Comparing base (4919983) to head (651f65c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1421      +/-   ##
==========================================
+ Coverage   94.53%   94.56%   +0.03%     
==========================================
  Files           2        2              
  Lines         512      515       +3     
  Branches       61       62       +1     
==========================================
+ Hits          484      487       +3     
  Misses         22       22              
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 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.

@tjkuson tjkuson marked this pull request as ready for review April 23, 2026 17:23
Copy link
Copy Markdown
Contributor

@seifertm seifertm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the mechanism to check whether the fixture has been overridden and adding a deprecation notice to the docs, instead of removing it from the documentation. Both are improvents on how pytest-asyncio handled theses things in previous versions.

Thanks!

@seifertm seifertm added this to the v1.4 milestone Apr 25, 2026
@seifertm seifertm added this pull request to the merge queue Apr 25, 2026
Merged via the queue into pytest-dev:main with commit ee0a6be Apr 25, 2026
22 checks passed
@tjkuson tjkuson deleted the deprecate-hook branch April 25, 2026 20:58
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.

Deprecate event_loop_policy fixture

3 participants