From dd55b03f6bbe42b6fdc99930e77716800c05119e Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Thu, 24 Nov 2022 09:42:34 +0000 Subject: [PATCH] Upgrade to `tornado` 6.2 (#7286) Co-authored-by: Lawrence Mitchell --- continuous_integration/environment-3.10.yaml | 2 +- continuous_integration/environment-3.8.yaml | 2 +- continuous_integration/environment-3.9.yaml | 2 +- distributed/deploy/tests/test_adaptive.py | 1 + distributed/deploy/tests/test_spec_cluster.py | 1 + distributed/tests/test_client.py | 10 +++++++--- distributed/tests/test_client_loop.py | 2 ++ distributed/tests/test_utils.py | 2 ++ requirements.txt | 2 +- 9 files changed, 17 insertions(+), 7 deletions(-) diff --git a/continuous_integration/environment-3.10.yaml b/continuous_integration/environment-3.10.yaml index ab5a2c91655..be9939b81c6 100644 --- a/continuous_integration/environment-3.10.yaml +++ b/continuous_integration/environment-3.10.yaml @@ -39,7 +39,7 @@ dependencies: - sortedcollections - tblib - toolz - - tornado<6.2 + - tornado >=6.2 - zict # overridden by git tip below - zstandard >=0.9.0 - pip: diff --git a/continuous_integration/environment-3.8.yaml b/continuous_integration/environment-3.8.yaml index 083a0722626..24c3cddec10 100644 --- a/continuous_integration/environment-3.8.yaml +++ b/continuous_integration/environment-3.8.yaml @@ -42,7 +42,7 @@ dependencies: - sortedcollections - tblib - toolz - - tornado<6.2 + - tornado >=6.2 - zict - zstandard >=0.9.0 - pip: diff --git a/continuous_integration/environment-3.9.yaml b/continuous_integration/environment-3.9.yaml index 77887b6bf1b..175dae3ec91 100644 --- a/continuous_integration/environment-3.9.yaml +++ b/continuous_integration/environment-3.9.yaml @@ -45,7 +45,7 @@ dependencies: - tblib - toolz - torchvision # Only tested here - - tornado<6.2 + - tornado >=6.2 - zict - zstandard >=0.9.0 - pip: diff --git a/distributed/deploy/tests/test_adaptive.py b/distributed/deploy/tests/test_adaptive.py index d88615a7565..59ec50eaab8 100644 --- a/distributed/deploy/tests/test_adaptive.py +++ b/distributed/deploy/tests/test_adaptive.py @@ -281,6 +281,7 @@ async def test_no_more_workers_than_tasks(): @pytest.mark.filterwarnings("ignore:There is no current event loop:DeprecationWarning") +@pytest.mark.filterwarnings("ignore:make_current is deprecated:DeprecationWarning") def test_basic_no_loop(cleanup): loop = None try: diff --git a/distributed/deploy/tests/test_spec_cluster.py b/distributed/deploy/tests/test_spec_cluster.py index 31b95e28026..e0e7301fcf8 100644 --- a/distributed/deploy/tests/test_spec_cluster.py +++ b/distributed/deploy/tests/test_spec_cluster.py @@ -83,6 +83,7 @@ def test_spec_sync(loop): @pytest.mark.filterwarnings("ignore:There is no current event loop:DeprecationWarning") +@pytest.mark.filterwarnings("ignore:make_current is deprecated:DeprecationWarning") def test_loop_started_in_constructor(cleanup): # test that SpecCluster.__init__ starts a loop in another thread cluster = SpecCluster(worker_spec, scheduler=scheduler, loop=None) diff --git a/distributed/tests/test_client.py b/distributed/tests/test_client.py index 590fc13fd74..a063dd4eeae 100644 --- a/distributed/tests/test_client.py +++ b/distributed/tests/test_client.py @@ -2889,6 +2889,7 @@ async def test_startup_close_startup(s, a, b): @pytest.mark.filterwarnings("ignore:There is no current event loop:DeprecationWarning") +@pytest.mark.filterwarnings("ignore:make_current is deprecated:DeprecationWarning") def test_startup_close_startup_sync(loop): with cluster() as (s, [a, b]): with Client(s["address"], loop=loop) as c: @@ -5613,6 +5614,8 @@ async def test_future_auto_inform(c, s, a, b): @pytest.mark.filterwarnings("ignore:There is no current event loop:DeprecationWarning") +@pytest.mark.filterwarnings("ignore:make_current is deprecated:DeprecationWarning") +@pytest.mark.filterwarnings("ignore:clear_current is deprecated:DeprecationWarning") def test_client_async_before_loop_starts(cleanup): async def close(): async with client: @@ -6590,9 +6593,9 @@ async def test_as_completed_condition_loop(c, s, a, b): sys.version_info >= (3, 10), reason="On Py3.10+ semaphore._loop is not bound until .acquire() blocks", ) -def test_client_connectionpool_semaphore_loop(s, a, b): - with Client(s["address"]) as c: - assert c.rpc.semaphore._loop is c.loop.asyncio_loop +def test_client_connectionpool_semaphore_loop(s, a, b, loop): + with Client(s["address"], loop=loop) as c: + assert c.rpc.semaphore._loop is loop.asyncio_loop @pytest.mark.slow @@ -6924,6 +6927,7 @@ async def test_workers_collection_restriction(c, s, a, b): @pytest.mark.filterwarnings("ignore:There is no current event loop:DeprecationWarning") +@pytest.mark.filterwarnings("ignore:make_current is deprecated:DeprecationWarning") @gen_cluster(client=True, nthreads=[("127.0.0.1", 1)]) async def test_get_client_functions_spawn_clusters(c, s, a): # see gh4565 diff --git a/distributed/tests/test_client_loop.py b/distributed/tests/test_client_loop.py index 35bb3a7e861..9d8316cdd09 100644 --- a/distributed/tests/test_client_loop.py +++ b/distributed/tests/test_client_loop.py @@ -30,6 +30,7 @@ def _check_cluster_and_client_loop(loop): # Test if Client stops LoopRunner on close. @pytest.mark.filterwarnings("ignore:There is no current event loop:DeprecationWarning") +@pytest.mark.filterwarnings("ignore:make_current is deprecated:DeprecationWarning") def test_close_loop_sync_start_new_loop(cleanup): with _check_loop_runner(): _check_cluster_and_client_loop(loop=None) @@ -37,6 +38,7 @@ def test_close_loop_sync_start_new_loop(cleanup): # Test if Client stops LoopRunner on close. @pytest.mark.filterwarnings("ignore:There is no current event loop:DeprecationWarning") +@pytest.mark.filterwarnings("ignore:make_current is deprecated:DeprecationWarning") def test_close_loop_sync_use_running_loop(cleanup): with _check_loop_runner(): # Start own loop or use current thread's one. diff --git a/distributed/tests/test_utils.py b/distributed/tests/test_utils.py index 0f8a2e92ddc..685a0f1ed39 100644 --- a/distributed/tests/test_utils.py +++ b/distributed/tests/test_utils.py @@ -407,6 +407,7 @@ def assert_not_running(loop): @pytest.mark.filterwarnings("ignore:There is no current event loop:DeprecationWarning") +@pytest.mark.filterwarnings("ignore:make_current is deprecated:DeprecationWarning") def test_loop_runner(loop_in_thread): # Implicit loop loop = IOLoop() @@ -490,6 +491,7 @@ def test_loop_runner(loop_in_thread): @pytest.mark.filterwarnings("ignore:There is no current event loop:DeprecationWarning") +@pytest.mark.filterwarnings("ignore:make_current is deprecated:DeprecationWarning") def test_two_loop_runners(loop_in_thread): # Loop runners tied to the same loop should cooperate diff --git a/requirements.txt b/requirements.txt index e2c3fe1e274..9685ece5853 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ psutil >= 5.0 sortedcontainers !=2.0.0, !=2.0.1 tblib >= 1.6.0 toolz >= 0.10.0 -tornado >= 6.0.3, <6.2 +tornado >= 6.0.3 urllib3 zict >= 0.1.3 pyyaml