jupyter / jupyter_client

Jupyter protocol client APIs
https://jupyter-client.readthedocs.io
BSD 3-Clause "New" or "Revised" License
380 stars 280 forks source link

Warning emitted by pyzmq 25: "zmq.eventloop.ioloop is deprecated in pyzmq 17" #913

Open jakelishman opened 1 year ago

jakelishman commented 1 year ago

jupyter_client version is 7.4.8

pyzmq 25 released earlier today, which seems to have removed some old code and caused a (very old) deprecation warning to begin getting emitted on import of jupyter_client. The traceback we're seeing in our CI starts with a seaborn import, and works its way through to jupyter_client via ipywidgets, but the trigger is just import jupyter_client:

  File "/home/vsts/work/1/s/image_tests/lib/python3.11/site-packages/seaborn/__init__.py", line 12, in <module>
    from .widgets import *  # noqa: F401,F403
    ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vsts/work/1/s/image_tests/lib/python3.11/site-packages/seaborn/widgets.py", line 6, in <module>
    from ipywidgets import interact, FloatSlider, IntSlider
  File "/home/vsts/work/1/s/image_tests/lib/python3.11/site-packages/ipywidgets/__init__.py", line 25, in <module>
    from .widgets import *
  File "/home/vsts/work/1/s/image_tests/lib/python3.11/site-packages/ipywidgets/widgets/__init__.py", line 4, in <module>
    from .widget import Widget, CallbackDispatcher, register, widget_serialization
  File "/home/vsts/work/1/s/image_tests/lib/python3.11/site-packages/ipywidgets/widgets/widget.py", line 13, in <module>
    from ipykernel.comm import Comm
  File "/home/vsts/work/1/s/image_tests/lib/python3.11/site-packages/ipykernel/__init__.py", line 5, in <module>
    from .connect import *  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vsts/work/1/s/image_tests/lib/python3.11/site-packages/ipykernel/connect.py", line 11, in <module>
    import jupyter_client
  File "/home/vsts/work/1/s/image_tests/lib/python3.11/site-packages/jupyter_client/__init__.py", line 8, in <module>
    from .asynchronous import AsyncKernelClient  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vsts/work/1/s/image_tests/lib/python3.11/site-packages/jupyter_client/asynchronous/__init__.py", line 1, in <module>
    from .client import AsyncKernelClient  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vsts/work/1/s/image_tests/lib/python3.11/site-packages/jupyter_client/asynchronous/client.py", line 6, in <module>
    from jupyter_client.channels import HBChannel
    _deprecated()
  File "/home/vsts/work/1/s/image_tests/lib/python3.11/site-packages/zmq/eventloop/ioloop.py", line 17, in _deprecated
    warnings.warn(
DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops.

We can suppress this warning in our CI as an immediate workaround for us, but it might be indicative of further breaking changes to come for Jupyter.

jakelishman commented 1 year ago

Looks like #842 is intending to fix this.