Skip to content

uvloop test will break in Python 3.16 #9218

@crusaderky

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"},
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    asynciodeprecationSomething is being removedtestsUnit tests and/or continuous integration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions