tornado and pyzmq

26 views
Skip to first unread message

François Bissey

unread,
Apr 28, 2020, 9:25:31 PM4/28/20
to sage-pa...@googlegroups.com
Hi all,

I have several doctests failures at the moment at the 9.1.rc2 level because
of the following deprecation warning polluting my output:
/usr/lib/python3.7/site-packages/ipykernel/kernelbase.py:19: VisibleDeprecationWarning: zmq.eventloop.minitornado is deprecated in pyzmq 14.0 and will be removed.
Install tornado itself to use zmq with the tornado IOLoop.

from jupyter_client.session import utcnow as now


========
It started to happen after I moved a number of python packages up
for matplotlib 3.2.1 in Gentoo.
I have the following version of involved packages
tornado 6.0.4
pyzmq 17.0.1
jupyter_client 5.3.4
ipython-7.5.0

Anyone seen something similar and know why it happens? And what to do about it,
may be?

Cheers,
François

Antonio Rojas

unread,
Apr 29, 2020, 2:08:17 AM4/29/20
to sage-packaging


El miércoles, 29 de abril de 2020, 3:25:31 (UTC+2), Francois Bissey escribió:

Anyone seen something similar and know why it happens? And what to do about it,
may be?


From https://github.com/zeromq/pyzmq/blob/master/zmq/eventloop/ioloop.py#L18 this looks as if you have a too old tornado version. 

François Bissey

unread,
Apr 29, 2020, 3:43:59 AM4/29/20
to sage-pa...@googlegroups.com
Hum, may be my pyzmq is too old for my tornado (I have the latest tornado but
not the latest pyzmq). At least I have something to test.

François

François Bissey

unread,
Apr 29, 2020, 3:53:56 AM4/29/20
to sage-pa...@googlegroups.com
Interesting idea all around but no. In any case, if my tornado was too old, it should
have printed the version.
Must be coming from somewhere else.

Antonio Rojas

unread,
Apr 29, 2020, 4:19:38 AM4/29/20
to sage-packaging


El miércoles, 29 de abril de 2020, 9:53:56 (UTC+2), Francois Bissey escribió:

Interesting idea all around but no. In any case, if my tornado was too old, it should
have printed the version.
Must be coming from somewhere else.


Not in this case, because the ImportError is inside a try: trap. What happens if you run those imports manually?

François Bissey

unread,
Apr 29, 2020, 4:26:46 AM4/29/20
to sage-pa...@googlegroups.com
As it happens, I tried that before my second answer.
IPython 7.5.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import tornado

In [2]: from tornado.log import gen_log

In [3]: from tornado import ioloop

In [4]: ioloop.IOLoop
Out[4]: tornado.ioloop.IOLoop

In [5]: if not hasattr(ioloop.IOLoop, 'configurable_default'):
...: raise ImportError("Tornado too old: %s" % getattr(tornado, 'version', 'unknown'))
...:

In [6]: getattr(tornado, 'version', 'unknown')
Out[6]: '6.0.4'

In [7]: getattr(ioloop.IOLoop,'configurable_default')
Out[7]: <bound method IOLoop.configurable_default of <class 'tornado.ioloop.IOLoop'>>

So nothing to see here.

Antonio Rojas

unread,
Apr 29, 2020, 4:33:48 AM4/29/20
to sage-packaging
I've used this trick in the past to get full backtraces of deprecation warnings. I suppose it could be helpful here to figure out where this is coming from.

François Bissey

unread,
Apr 29, 2020, 4:48:27 AM4/29/20
to sage-pa...@googlegroups.com
Thanks, that was quite helpful. My pyzmq is not new enough. The problem comes
from
File "/usr/lib/python3.7/site-packages/zmq/eventloop/zmqstream.py", line 42, in <module>
from .minitornado import stack_context

Going to GitHub in the zmq/eventloop folder I can see the following message next to
zmqstream.py "handle removal of stack_context in tornado 6”.
Which is exactly the cause of my trouble. pyzmq needs to be at least 18.0.0.
> --
> You received this message because you are subscribed to the Google Groups "sage-packaging" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-packagin...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-packaging/38541863-8ef8-44fb-a369-69b8ab18302f%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages