>>> l = [x for x in gc.get_objects() if isinstance(x, (distributed.Scheduler, distributed.Client, distributed.Worker, distributed.Nanny))]
>>> len(l)
479
>>> pprint.pprint(collections.Counter(type(x) for x in l))
Counter({<class 'distributed.scheduler.Scheduler'>: 447,
<class 'distributed.worker.Worker'>: 19,
<class 'distributed.client.Client'>: 9,
<class 'distributed.nanny.Nanny'>: 4})
So the test suite is really leaking a ton of Scheduler instances...
At the end of the test suite (I'm running
distributed/tests):So the test suite is really leaking a ton of Scheduler instances...