Skip to content

tornado 6.0 breaks notebook #4439

@haokanga

Description

@haokanga

tornado 6.0 is released at 10AM ET, March 1, 2019, which breaks Jupyter Notebook.
https://pypi.org/project/tornado/6.0/#history

Error message

TypeError: 'type' object is not subscriptable

How to reproduce & Error trace

$ python3 -m venv /home/clouduser/virtualenv 
$ source /home/clouduser/virtualenv/bin/activate
$ pip install pandas jupyter jupyterlab protobuf mysqlclient
$ jupyter notebook --no-browser
Traceback (most recent call last):
  File "/home/clouduser/virtualenv/bin/jupyter-notebook", line 7, in <module>
    from notebook.notebookapp import main
  File "/home/clouduser/virtualenv/lib/python3.5/site-packages/notebook/notebookapp.py", line 47, in <module>
    from zmq.eventloop import ioloop
  File "/home/clouduser/virtualenv/lib/python3.5/site-packages/zmq/eventloop/__init__.py", line 3, in <module>
    from zmq.eventloop.ioloop import IOLoop
  File "/home/clouduser/virtualenv/lib/python3.5/site-packages/zmq/eventloop/ioloop.py", line 21, in <module>
    from tornado import ioloop
  File "/home/clouduser/virtualenv/lib/python3.5/site-packages/tornado/ioloop.py", line 45, in <module>
    from tornado.concurrent import (
  File "/home/clouduser/virtualenv/lib/python3.5/site-packages/tornado/concurrent.py", line 175, in <module>
    future: Union["futures.Future[_T]", "Future[_T]"], value: _T
  File "/usr/lib/python3.5/typing.py", line 552, in __getitem__
    dict(self.__dict__), parameters, _root=True)
  File "/usr/lib/python3.5/typing.py", line 512, in __new__
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
  File "/usr/lib/python3.5/typing.py", line 512, in <genexpr>
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
  File "/usr/lib/python3.5/typing.py", line 190, in __subclasscheck__
    self._eval_type(globalns, localns)
  File "/usr/lib/python3.5/typing.py", line 177, in _eval_type
    eval(self.__forward_code__, globalns, localns),
  File "<string>", line 1, in <module>
TypeError: 'type' object is not subscriptable

Environments

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial


$python --version
Python 3.5.2

$ pip freeze
attrs==18.2.0
backcall==0.1.0
bleach==3.1.0
decorator==4.3.2
defusedxml==0.5.0
entrypoints==0.3
ipykernel==5.1.0
ipython==7.3.0
ipython-genutils==0.2.0
ipywidgets==7.4.2
jedi==0.13.3
Jinja2==2.10
jsonschema==3.0.1
jupyter==1.0.0
jupyter-client==5.2.4
jupyter-console==6.0.0
jupyter-core==4.4.0
jupyterlab==0.35.4
jupyterlab-server==0.2.0
MarkupSafe==1.1.1
mistune==0.8.4
mysqlclient==1.4.2.post1
nbconvert==5.4.1
nbformat==4.4.0
notebook==5.7.4
numpy==1.16.2
pandas==0.24.1
pandocfilters==1.4.2
parso==0.3.4
pexpect==4.6.0
pickleshare==0.7.5
pkg-resources==0.0.0
prometheus-client==0.6.0
prompt-toolkit==2.0.9
protobuf==3.7.0
ptyprocess==0.6.0
Pygments==2.3.1
pyrsistent==0.14.11
python-dateutil==2.8.0
pytz==2018.9
pyzmq==18.0.0
qtconsole==4.4.3
Send2Trash==1.5.0
six==1.12.0
terminado==0.8.1
testpath==0.4.2
tornado==6.0
traitlets==4.3.2
wcwidth==0.1.7
webencodings==0.5.1
widgetsnbextension==3.4.2

On our side, we have to downgrade tornado to 5.1.1 to address the issue.

pip install tornado==5.1.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions