From 284d20dacdae75b94c42acf01acb6e53600c4da6 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Thu, 17 Feb 2022 17:30:51 +0000 Subject: [PATCH 1/3] use the ProactorEventLoop on windows --- distributed/config.py | 12 +++--------- requirements.txt | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/distributed/config.py b/distributed/config.py index 15e563b18a5..a5f18952106 100644 --- a/distributed/config.py +++ b/distributed/config.py @@ -1,4 +1,3 @@ -import asyncio import logging import logging.config import os @@ -9,7 +8,7 @@ import dask from dask.utils import import_required -from .compatibility import WINDOWS, logging_names +from .compatibility import logging_names config = dask.config.config @@ -166,13 +165,8 @@ def initialize_event_loop(config): " pip install uvloop", ) uvloop.install() - elif event_loop in {"asyncio", "tornado"}: - if WINDOWS: - # WindowsProactorEventLoopPolicy is not compatible with tornado 6 - # fallback to the pre-3.8 default of Selector - # https://github.com/tornadoweb/tornado/issues/2608 - asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) - else: + return + if event_loop not in {"asyncio", "tornado"}: raise ValueError( "Expected distributed.admin.event-loop to be in ('asyncio', 'tornado', 'uvloop'), got %s" % dask.config.get("distributed.admin.event-loop") diff --git a/requirements.txt b/requirements.txt index 3ddf88401c1..13921e647ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ psutil >= 5.0 sortedcontainers !=2.0.0, !=2.0.1 tblib >= 1.6.0 toolz >= 0.8.2 -tornado >= 6.0.3 +tornado >= 6.1 zict >= 0.1.3 pyyaml setuptools From e54ba57f9fae68ed72130cb7afb5deb58c20250b Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Tue, 22 Feb 2022 15:33:20 +0000 Subject: [PATCH 2/3] use bokeh from 13edfabc315e1df4082c73d4a198b13880795764 --- continuous_integration/environment-3.8.yaml | 2 +- continuous_integration/environment-3.9.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/continuous_integration/environment-3.8.yaml b/continuous_integration/environment-3.8.yaml index 14f81813f5d..f749f56eafb 100644 --- a/continuous_integration/environment-3.8.yaml +++ b/continuous_integration/environment-3.8.yaml @@ -7,7 +7,6 @@ dependencies: - packaging - pip - asyncssh - - bokeh - click - cloudpickle - coverage @@ -46,4 +45,5 @@ dependencies: - pip: - git+https://github.com/dask/dask - git+https://github.com/jcrist/crick # Only tested here + - git+https://github.com/graingert/bokeh@13edfabc315e1df4082c73d4a198b13880795764 - keras diff --git a/continuous_integration/environment-3.9.yaml b/continuous_integration/environment-3.9.yaml index ce156549709..a9550bb0f48 100644 --- a/continuous_integration/environment-3.9.yaml +++ b/continuous_integration/environment-3.9.yaml @@ -8,7 +8,6 @@ dependencies: - packaging - pip - asyncssh - - bokeh - click - cloudpickle - coverage @@ -53,6 +52,7 @@ dependencies: - git+https://github.com/dask/dask - git+https://github.com/dask/s3fs - git+https://github.com/dask/zict + - git+https://github.com/graingert/bokeh@13edfabc315e1df4082c73d4a198b13880795764 # FIXME https://github.com/dask/distributed/issues/5345 # - git+https://github.com/intake/filesystem_spec - git+https://github.com/joblib/joblib From b4615c729cb39e3b2b588deee963bc2d9b24646d Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Tue, 22 Feb 2022 18:43:24 +0000 Subject: [PATCH 3/3] Figure class got renamed in bokeh 3 --- distributed/diagnostics/tests/test_task_stream.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distributed/diagnostics/tests/test_task_stream.py b/distributed/diagnostics/tests/test_task_stream.py index f700f3f235c..871511ce6bf 100644 --- a/distributed/diagnostics/tests/test_task_stream.py +++ b/distributed/diagnostics/tests/test_task_stream.py @@ -138,7 +138,7 @@ async def test_get_task_stream_plot(c, s, a, b): await wait(futures) data, figure = await c.get_task_stream(plot=True) - assert isinstance(figure, bokeh.plotting.Figure) + assert isinstance(figure, bokeh.plotting.figure) def test_get_task_stream_save(client, tmpdir): @@ -153,4 +153,4 @@ def test_get_task_stream_save(client, tmpdir): assert "inc" in data assert "bokeh" in data - assert isinstance(ts.figure, bokeh.plotting.Figure) + assert isinstance(ts.figure, bokeh.plotting.figure)