Skip to content

uvloop test will break in Python 3.16 #9218

Closed

Description

@crusaderky

get_event_loop_policy and set_event_loop_policy are deprecated in Python 3.14 and will be removed in 3.16.
https://docs.python.org/3.15/library/asyncio-policy.html#asyncio.get_event_loop_policy

This test will break:

def test_uvloop_event_loop():
"""Check that configuring distributed to use uvloop actually sets the event loop policy"""
pytest.importorskip("uvloop")
script = (
"import distributed, asyncio, uvloop\n"
"assert isinstance(asyncio.get_event_loop_policy(), uvloop.EventLoopPolicy)"
)
subprocess.check_call(
[sys.executable, "-c", script],
env={"DASK_DISTRIBUTED__ADMIN__EVENT_LOOP": "uvloop"},
)

Activity

  1. added
    tests
    deprecation
    on Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    asynciodeprecationtests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions