Skip to content

BUG: Advice around avoiding proactor event loop warning raises deprecation warning with Python 3.14+ #2137

@Andy-Grigg

Description

@Andy-Grigg

This is a pyzmq bug

  • This is a pyzmq-specific bug, not an issue of zmq socket behavior. Don't worry if you're not sure! We'll figure it out together.

What pyzmq version?

27.1.0

What libzmq version?

4.3.5

Python version (and how it was installed)

3.14.0 from python.org

OS

Windows 11

What happened?

The advice in the warning message:

RuntimeWarning: Proactor event loop does not implement add_reader family of methods required for zmq.
Registering an additional selector thread for add_reader support via tornado.
Use asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy()) to avoid this warning.

results in a deprecation warning in Python 3.14.0, since as of Python 3.14 policies are deprecated: https://docs.python.org/3/library/asyncio-policy.html.

I'm not using pyzmq directly, but via nbconvert and jupyter-core. This might be a bug in the jupyter ecosystem as well, but even so, pyzmq probably shouldn't be giving advice in a warning message which causes another warning. I must admit though, I don't know enough about asyncio to be able to properly understand the policy depecation and whether there's a path through.

Code to reproduce bug

Traceback, if applicable

More info

Related to #1830

Old bug report against nbconvert for this warning: jupyter/nbconvert#2186

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions