Skip to content

Commit

Permalink
Merge remote-tracking branch 'graingert/tornado-62' into python-311
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed Nov 23, 2022
2 parents d05fcd4 + 82fc870 commit a01ff88
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion continuous_integration/environment-3.10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion continuous_integration/environment-3.8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies:
- sortedcollections
- tblib
- toolz
- tornado<6.2
- tornado >=6.2
- zict
- zstandard >=0.9.0
- pip:
Expand Down
2 changes: 1 addition & 1 deletion continuous_integration/environment-3.9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dependencies:
- tblib
- toolz
- torchvision # Only tested here
- tornado<6.2
- tornado >=6.2
- zict
- zstandard >=0.9.0
- pip:
Expand Down
1 change: 1 addition & 0 deletions distributed/deploy/tests/test_adaptive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions distributed/deploy/tests/test_spec_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 7 additions & 3 deletions distributed/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions distributed/tests/test_client_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ 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)


# 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.
Expand Down
2 changes: 2 additions & 0 deletions distributed/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a01ff88

Please sign in to comment.