diff --git a/trio/_core/_run.py b/trio/_core/_run.py index 36112784c4..1bc4e70b0c 100644 --- a/trio/_core/_run.py +++ b/trio/_core/_run.py @@ -671,7 +671,6 @@ class Runner: runq = attr.ib(default=attr.Factory(deque)) tasks = attr.ib(default=attr.Factory(set)) - r = attr.ib(default=attr.Factory(random.Random)) # {(deadline, id(CancelScope)): CancelScope} # only contains scopes with non-infinite deadlines that are currently @@ -1433,7 +1432,7 @@ def run_impl(runner, async_fn, args): # ordering of task._notify_queues.) batch = list(runner.runq) runner.runq.clear() - runner.r.shuffle(batch) + _r.shuffle(batch) while batch: task = batch.pop() GLOBAL_RUN_CONTEXT.task = task