---
blogpost: true
date: Jun 22, 2019
title: Dask Release 2.0
author: the Dask Maintainers
tags: release
description: We broke a bunch of APIs
---

_Please take the [Dask User Survey for 2019](https://t.co/OGrIjTLC2G)._
_Your reponse helps to prioritize future work._

<hr>

We are pleased to announce the release of Dask version 2.0.
This is a major release with bug fixes and new features.

Most major version changes of software signal many new and exciting features.
That is not the case with this release.
Instead, we're bumping the major version number because
we've broken a few APIs to improve maintainability,
and because we decided to drop support for Python 2.

This blogpost outlines these changes.

## Install

As always, you can conda install Dask:

    conda install dask

or pip install from PyPI:

    pip install "dask[complete]" --upgrade

Full changelogs are available here:

- [dask/dask](https://github.com/dask/dask/blob/master/docs/source/changelog.rst)
- [dask/distributed](https://github.com/dask/distributed/blob/master/docs/source/changelog.rst)

## Drop support for Python 2

Python 2 reaches end of life in 2020, just six months away. Most major PyData
projects are dropping Python 2 support around now. See the [Python 3
Statement](https://python3statement.org/) for more details about some of your
favorite projects.

Python 2 users can continue to use older versions of Dask, which are in
widespread use today. Institutions looking for long term support of Dask in
Python 2 may wish to reach out to for-profit consulting companies, like
[Quansight](https://www.quansight.com/).

Dropping Python 2 will allow maintainers to spend more of their time fixing
bugs and developing new features. It will also allow the project to adopt more
modern development practices going forward.

## Small breaking changes

We now include a list with a brief description of most of the breaking changes:

- The distributed.bokeh module has moved to distributed.dashboard
- Various `ncores` keywords have been moved to `nthreads`
- Client.map/gather/scatter no longer accept iterators and Python queue
  objects. Users can handle this themselves with `submit`/`as_completed` or
  can use the [Streamz](https://github.com/python-streamz/streamz) library.
- The worker `/main` route has moved to `/status`
- Cluster.workers is now a dictionary mapping worker name to worker, rather
  than a list as it was before

## Some larger fun changes

We didn't only break things. We also added some new things :)

### Array metadata

Previously Dask Arrays were defined by their shape, chunkshape, and datatype,
like float, int, and so on.

Now, Dask Arrays also know the type of their chunks. Historically this was
almost always a NumPy array, so it didn't make sense to store, but now that
Dask Arrays are being used more frequently with sparse array chunks and GPU
array chunks we now maintain this information as well in a `._meta` attribute.
This is already how Dask dataframes work, so it should be familiar to advanced
users of that module.

```python
>>> import dask.array as da
>>> x = da.eye(1000000)
>>> x._meta
array([], shape=(0, 0), dtype=float64)

>>> import sparse
>>> s = x.map_blocks(sparse.COO.from_numpy)
>>> s._meta
<COO: shape=(0, 0), dtype=float64, nnz=0, fill_value=0.0>
```

This work was largely done by [Peter Entschev](https://github.com/pentschev)

### Array HTML output

Dask arrays now print themselves nicely in Jupyter notebooks, showing a table
of information about their size and chunk size, and also a visual diagram of
their chunk structure.

```python
import dask.array as da
x = da.ones((10000, 1000, 1000))
```

<table>
<tr>
<td>
<table>  <thead>    <tr><td> </td><th> Array </th><th> Chunk </th></tr>
  </thead>
  <tbody>
    <tr><th> Bytes </th><td> 80.00 GB </td> <td> 125.00 MB </td></tr>
    <tr><th> Shape </th><td> (10000, 1000, 1000) </td> <td> (250, 250, 250) </td></tr>
    <tr><th> Count </th><td> 640 Tasks </td><td> 640 Chunks </td></tr>
    <tr><th> Type </th><td> float64 </td><td> numpy.ndarray </td></tr>
  </tbody></table>
</td>
<td>
<svg width="241" height="231" style="stroke:rgb(0,0,0);stroke-width:1" >

  <!-- Horizontal lines -->
  <line x1="10" y1="0" x2="127" y2="117" style="stroke-width:2" />
  <line x1="10" y1="16" x2="127" y2="133" />
  <line x1="10" y1="32" x2="127" y2="149" />
  <line x1="10" y1="48" x2="127" y2="165" />
  <line x1="10" y1="64" x2="127" y2="181" style="stroke-width:2" />

  <!-- Vertical lines -->
  <line x1="10" y1="0" x2="10" y2="64" style="stroke-width:2" />
  <line x1="12" y1="2" x2="12" y2="67" />
  <line x1="15" y1="5" x2="15" y2="70" />
  <line x1="18" y1="8" x2="18" y2="73" />
  <line x1="21" y1="11" x2="21" y2="76" />
  <line x1="24" y1="14" x2="24" y2="79" />
  <line x1="27" y1="17" x2="27" y2="81" />
  <line x1="30" y1="20" x2="30" y2="84" />
  <line x1="33" y1="23" x2="33" y2="87" />
  <line x1="36" y1="26" x2="36" y2="90" />
  <line x1="39" y1="29" x2="39" y2="93" />
  <line x1="42" y1="32" x2="42" y2="96" />
  <line x1="45" y1="35" x2="45" y2="99" />
  <line x1="48" y1="38" x2="48" y2="102" />
  <line x1="51" y1="41" x2="51" y2="105" />
  <line x1="54" y1="44" x2="54" y2="108" />
  <line x1="57" y1="47" x2="57" y2="111" />
  <line x1="60" y1="50" x2="60" y2="114" />
  <line x1="62" y1="52" x2="62" y2="117" />
  <line x1="65" y1="55" x2="65" y2="120" />
  <line x1="68" y1="58" x2="68" y2="123" />
  <line x1="71" y1="61" x2="71" y2="126" />
  <line x1="74" y1="64" x2="74" y2="129" />
  <line x1="77" y1="67" x2="77" y2="131" />
  <line x1="80" y1="70" x2="80" y2="134" />
  <line x1="83" y1="73" x2="83" y2="137" />
  <line x1="86" y1="76" x2="86" y2="140" />
  <line x1="89" y1="79" x2="89" y2="143" />
  <line x1="92" y1="82" x2="92" y2="146" />
  <line x1="95" y1="85" x2="95" y2="149" />
  <line x1="98" y1="88" x2="98" y2="152" />
  <line x1="101" y1="91" x2="101" y2="155" />
  <line x1="104" y1="94" x2="104" y2="158" />
  <line x1="107" y1="97" x2="107" y2="161" />
  <line x1="110" y1="100" x2="110" y2="164" />
  <line x1="112" y1="102" x2="112" y2="167" />
  <line x1="115" y1="105" x2="115" y2="170" />
  <line x1="118" y1="108" x2="118" y2="173" />
  <line x1="121" y1="111" x2="121" y2="176" />
  <line x1="124" y1="114" x2="124" y2="179" />
  <line x1="127" y1="117" x2="127" y2="181" style="stroke-width:2" />

  <!-- Colored Rectangle -->
  <polygon points="10.000000,0.000000 127.647059,117.647059 127.647059,181.975164 10.000000,64.328105" style="fill:#ECB172A0;stroke-width:0"/>

  <!-- Horizontal lines -->
  <line x1="10" y1="0" x2="74" y2="0" style="stroke-width:2" />
  <line x1="12" y1="2" x2="77" y2="2" />
  <line x1="15" y1="5" x2="80" y2="5" />
  <line x1="18" y1="8" x2="83" y2="8" />
  <line x1="21" y1="11" x2="86" y2="11" />
  <line x1="24" y1="14" x2="89" y2="14" />
  <line x1="27" y1="17" x2="91" y2="17" />
  <line x1="30" y1="20" x2="94" y2="20" />
  <line x1="33" y1="23" x2="97" y2="23" />
  <line x1="36" y1="26" x2="100" y2="26" />
  <line x1="39" y1="29" x2="103" y2="29" />
  <line x1="42" y1="32" x2="106" y2="32" />
  <line x1="45" y1="35" x2="109" y2="35" />
  <line x1="48" y1="38" x2="112" y2="38" />
  <line x1="51" y1="41" x2="115" y2="41" />
  <line x1="54" y1="44" x2="118" y2="44" />
  <line x1="57" y1="47" x2="121" y2="47" />
  <line x1="60" y1="50" x2="124" y2="50" />
  <line x1="62" y1="52" x2="127" y2="52" />
  <line x1="65" y1="55" x2="130" y2="55" />
  <line x1="68" y1="58" x2="133" y2="58" />
  <line x1="71" y1="61" x2="136" y2="61" />
  <line x1="74" y1="64" x2="139" y2="64" />
  <line x1="77" y1="67" x2="141" y2="67" />
  <line x1="80" y1="70" x2="144" y2="70" />
  <line x1="83" y1="73" x2="147" y2="73" />
  <line x1="86" y1="76" x2="150" y2="76" />
  <line x1="89" y1="79" x2="153" y2="79" />
  <line x1="92" y1="82" x2="156" y2="82" />
  <line x1="95" y1="85" x2="159" y2="85" />
  <line x1="98" y1="88" x2="162" y2="88" />
  <line x1="101" y1="91" x2="165" y2="91" />
  <line x1="104" y1="94" x2="168" y2="94" />
  <line x1="107" y1="97" x2="171" y2="97" />
  <line x1="110" y1="100" x2="174" y2="100" />
  <line x1="112" y1="102" x2="177" y2="102" />
  <line x1="115" y1="105" x2="180" y2="105" />
  <line x1="118" y1="108" x2="183" y2="108" />
  <line x1="121" y1="111" x2="186" y2="111" />
  <line x1="124" y1="114" x2="189" y2="114" />
  <line x1="127" y1="117" x2="191" y2="117" style="stroke-width:2" />

  <!-- Vertical lines -->
  <line x1="10" y1="0" x2="127" y2="117" style="stroke-width:2" />
  <line x1="26" y1="0" x2="143" y2="117" />
  <line x1="42" y1="0" x2="159" y2="117" />
  <line x1="58" y1="0" x2="175" y2="117" />
  <line x1="74" y1="0" x2="191" y2="117" style="stroke-width:2" />

  <!-- Colored Rectangle -->
  <polygon points="10.000000,0.000000 74.328105,0.000000 191.975164,117.647059 127.647059,117.647059" style="fill:#ECB172A0;stroke-width:0"/>

  <!-- Horizontal lines -->
  <line x1="127" y1="117" x2="191" y2="117" style="stroke-width:2" />
  <line x1="127" y1="133" x2="191" y2="133" />
  <line x1="127" y1="149" x2="191" y2="149" />
  <line x1="127" y1="165" x2="191" y2="165" />
  <line x1="127" y1="181" x2="191" y2="181" style="stroke-width:2" />

  <!-- Vertical lines -->
  <line x1="127" y1="117" x2="127" y2="181" style="stroke-width:2" />
  <line x1="143" y1="117" x2="143" y2="181" />
  <line x1="159" y1="117" x2="159" y2="181" />
  <line x1="175" y1="117" x2="175" y2="181" />
  <line x1="191" y1="117" x2="191" y2="181" style="stroke-width:2" />

  <!-- Colored Rectangle -->
  <polygon points="127.647059,117.647059 191.975164,117.647059 191.975164,181.975164 127.647059,181.975164" style="fill:#ECB172A0;stroke-width:0"/>

  <!-- Text -->

<text x="159.811111" y="201.975164" font-size="1.0rem" font-weight="100" text-anchor="middle" >1000</text>
<text x="211.975164" y="149.811111" font-size="1.0rem" font-weight="100" text-anchor="middle" transform="rotate(-90,211.975164,149.811111)">1000</text>
<text x="58.823529" y="143.151634" font-size="1.0rem" font-weight="100" text-anchor="middle" transform="rotate(45,58.823529,143.151634)">10000</text>
</svg>

</td>
</tr>
</table>

### Proxy Worker dashboards from the Scheduler dashboard

If you've used Dask.distributed they you're probably familiar with Dask's
scheduler dashboard, which shows the state of computations on the cluster with
a real-time interactive [Bokeh](https://bokeh.org) dashboard. However you may
not be aware that Dask workers also have their own dashboard, which shows a
completely separate set of plots for the state of that individual worker.

Historically these worker dashboards haven't been as commonly used because it's
hard to connect to them. Users don't know their address, or network rules
don't enable direct web connections. Fortunately, the scheduler dashboard is
now able to proxy a connection from the user to the worker dashbaord.

You can access this by clicking on the "Info" tab and then selecting the
"dashboard" link next to any of the workers. You will need to also install
[jupyter-server-proxy](https://github.com/jupyterhub/jupyter-server-proxy)

    pip install jupyter-server-proxy

Thanks to [Ben Zaitlen](https://github.com/quasiben) for this fun addtition.
We hope that now that these plots are made more visible, people will invest
more into developing plots for them.

### Black everywhere

We now use the [Black](https://black.readthedocs.io/) code formatter throughout
most Dask repositories. These repositories include pre-commit hooks, which we
recommend when developing on the project.

```
cd /path/to/dask
git checkout master
git pull upstream master

pip install pre-commit
pre-commit install
```

Git will then call `black` and `flake8` whenever you attempt to commit code.

## Dask Gateway

We would also like to inform readers about the somewhat new [Dask
Gateway](https://github.com/jcrist/dask-gateway) project that enables
institutions and IT to control many Dask clusters for a variety of users.

<img src="https://jcrist.github.io/dask-gateway/_images/architecture.svg"
     width="70%"
     alt="Dask Gateway">

## Acknowledgements

There have been several releases since the last time we had a release blogpost.
The following people contributed to the following repositories since the 1.1.0
release on January 23rd:

- [dask/dask](https://github.com/dask/dask)

  - (Rick) Richard J Zamora
  - Abhinav Ralhan
  - Adam Beberg
  - Alistair Miles
  - Álvaro Abella Bascarán
  - Anderson Banihirwe
  - Aploium
  - Bart Broere
  - Benjamin Zaitlen
  - Bouwe Andela
  - Brett Naul
  - Brian Chu
  - Bruce Merry
  - Christian Hudon
  - Cody Johnson
  - Dan O'Donovan
  - Daniel Saxton
  - Daniel Severo
  - Danilo Horta
  - Dimplexion
  - Elliott Sales de Andrade
  - Endre Mark Borza
  - Genevieve Buckley
  - George Sakkis
  - Guillaume Lemaitre
  - HSR05
  - Hameer Abbasi
  - Henrique Ribeiro
  - Henry Pinkard
  - Hugo
  - Ian Bolliger
  - Ian Rose
  - Isaiah Norton
  - James Bourbeau
  - Janne Vuorela
  - John Kirkham
  - Jim Crist
  - Joe Corbett
  - Jorge Pessoa
  - Julia Signell
  - JulianWgs
  - Justin Poehnelt
  - Justin Waugh
  - Ksenia Bobrova
  - Lijo Jose
  - Marco Neumann
  - Mark Bell
  - Martin Durant
  - Matthew Rocklin
  - Michael Eaton
  - Michał Jastrzębski
  - Nathan Matare
  - Nick Becker
  - Paweł Kordek
  - Peter Andreas Entschev
  - Philipp Rudiger
  - Philipp S. Sommer
  - Roma Sokolov
  - Ross Petchler
  - Scott Sievert
  - Shyam Saladi
  - Søren Fuglede Jørgensen
  - Thomas Zilio
  - Tom Augspurger
  - Yu Feng
  - aaronfowles
  - amerkel2
  - asmith26
  - btw08
  - gregrf
  - mbarkhau
  - mcsoini
  - severo
  - tpanza

- [dask/distributed](https://github.com/dask/distributed)

  - Adam Beberg
  - Benjamin Zaitlen
  - Brett Jurman
  - Brett Randall
  - Brian Chu
  - Caleb
  - Chris White
  - Daniel Farrell
  - Elliott Sales de Andrade
  - George Sakkis
  - James Bourbeau
  - Jim Crist
  - John Kirkham
  - K.-Michael Aye
  - Loïc Estève
  - Magnus Nord
  - Manuel Garrido
  - Marco Neumann
  - Martin Durant
  - Mathieu Dugré
  - Matt Nicolls
  - Matthew Rocklin
  - Michael Delgado
  - Michael Spiegel
  - Muammar El Khatib
  - Nikos Tsaousis
  - Olivier Grisel
  - Peter Andreas Entschev
  - Sam Grayson
  - Scott Sievert
  - Tom Augspurger
  - Torsten Wörtwein
  - amerkel2
  - condoratberlin
  - deepthirajagopalan7
  - jukent
  - plbertrand

- [dask/dask-ml](https://github.com/dask/dask-ml)

  - Alejandro
  - Florian Rohrer
  - James Bourbeau
  - Julien Jerphanion
  - Matthew Rocklin
  - Nathan Henrie
  - Paul Vecchio
  - Ryan McCormick
  - Saadullah Amin
  - Scott Sievert
  - Sriharsha Atyam
  - Tom Augspurger

- [dask/dask-jobqueue](https://github.com/dask/dask-jobqueue)

  - Andrea Zonca
  - Guillaume Eynard-Bontemps
  - Kyle Husmann
  - Levi Naden
  - Loïc Estève
  - Matthew Rocklin
  - Matyas Selmeci
  - ocaisa

- [dask/dask-kubernetes](https://github.com/dask/dask-kubernetes)

  - Brian Phillips
  - Jacob Tomlinson
  - Jim Crist
  - Joe Hamman
  - Joseph Hamman
  - Matthew Rocklin
  - Tom Augspurger
  - Yuvi Panda
  - adam

- [dask/dask-examples](https://github.com/dask/dask-examples)

  - Christoph Deil
  - Genevieve Buckley
  - Ian Rose
  - Martin Durant
  - Matthew Rocklin
  - Matthias Bussonnier
  - Robert Sare
  - Tom Augspurger
  - Willi Rath

- [dask/dask-labextension](https://github.com/dask/dask-labextension)
  - Daniel Bast
  - Ian Rose
  - Matthew Rocklin
  - Yuvi Panda
