Skip to content

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

  • Verify the RST renders correctly in the Sphinx docs build (tox -e docs or equivalent)
  • Confirm the code example works with a recent uvloop (>= 0.21) by placing it in a conftest.py and running an async test

🤖 Generated with Claude Code

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 Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.64%. Comparing base (cb129a6) to head (7dd8396).

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documented uvloop pattern is deprecated

2 participants