Skip to content

Docs: update uvloop how-to to avoid deprecated EventLoopPolicy#1355

Open
veeceey wants to merge 2 commits intopytest-dev:mainfrom
veeceey:fix/issue-1346
Open

Docs: update uvloop how-to to avoid deprecated EventLoopPolicy#1355
veeceey wants to merge 2 commits intopytest-dev:mainfrom
veeceey:fix/issue-1346

Conversation

@veeceey
Copy link

@veeceey veeceey commented Feb 8, 2026

Summary

  • Replaces the deprecated uvloop.EventLoopPolicy() pattern in docs/how-to-guides/uvloop.rst with a minimal custom policy subclass that delegates to uvloop.new_event_loop()
  • Adds a .. note:: block explaining the deprecation context (uvloop#637, Python 3.14 policy deprecation) and linking to #1164 for the planned non-policy-based replacement
  • Follows the same deprecation-warning suppression pattern already used in multiple_loops_example.py and the fixtures reference examples

Closes #1346

Test plan

  • Verified the RST renders correctly in the Sphinx docs build
  • Confirmed the code example works with a recent uvloop (>= 0.21) by placing it in a conftest.py and running an async test

uvloop.EventLoopPolicy was deprecated in uvloop 0.21 and will be
removed in Python 3.16. Replace the documented pattern with a minimal
custom policy subclass that delegates to uvloop.new_event_loop(),
and add a note about the deprecation context and future plans.

Closes pytest-dev#1346

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov-commenter
Copy link

codecov-commenter commented Feb 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.64%. Comparing base (cb129a6) to head (a144bdf).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1355   +/-   ##
=======================================
  Coverage   93.64%   93.64%           
=======================================
  Files           2        2           
  Lines         409      409           
  Branches       44       44           
=======================================
  Hits          383      383           
  Misses         20       20           
  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.

@veeceey
Copy link
Author

veeceey commented Feb 19, 2026

Hi maintainers, friendly ping on this PR. It's been open for about 10 days. All checks are passing and codecov shows full coverage. Would appreciate a review when you get a chance. Thank you!

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.

Documented uvloop pattern is deprecated

2 participants

Comments