Skip to content

Commit f7d28d4

Browse files
committed
Remove explicit loop from asyncio tests
In 3.10, the _internal_ `_loop` attribute of several asyncio classes has been removed.
1 parent b3f50ce commit f7d28d4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

distributed/tests/test_client.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6461,19 +6461,28 @@ async def f(stacklevel, mode=None):
64616461
assert "cdn.bokeh.org" in data
64626462

64636463

6464+
@pytest.mark.skipif(
6465+
sys.version_info >= (3, 10), reason="No internal loop in Python 3.10"
6466+
)
64646467
@gen_cluster(nthreads=[])
64656468
async def test_client_gather_semaphore_loop(s):
64666469
async with Client(s.address, asynchronous=True) as c:
64676470
assert c._gather_semaphore._loop is c.loop.asyncio_loop
64686471

64696472

6473+
@pytest.mark.skipif(
6474+
sys.version_info >= (3, 10), reason="No internal loop in Python 3.10"
6475+
)
64706476
@gen_cluster(client=True)
64716477
async def test_as_completed_condition_loop(c, s, a, b):
64726478
seq = c.map(inc, range(5))
64736479
ac = as_completed(seq)
64746480
assert ac.condition._loop == c.loop.asyncio_loop
64756481

64766482

6483+
@pytest.mark.skipif(
6484+
sys.version_info >= (3, 10), reason="No internal loop in Python 3.10"
6485+
)
64776486
def test_client_connectionpool_semaphore_loop(s, a, b):
64786487
with Client(s["address"]) as c:
64796488
assert c.rpc.semaphore._loop is c.loop.asyncio_loop

0 commit comments

Comments
 (0)