On Thu, Jul 24, 2014 at 8:12 PM, Steven D'Aprano <st...@pearwood.info> wrote: >> Would it be possible to snapshot all critical globals with a closure, to >> force them to be held? Something like: > > Probably. Or even as default argument parameters. But I'd like to know if > that's actually fixing it or just perturbing the system enough that the > bug won't show up until next time the moon is full.
If the problem is that there's a circular reference (function to module, module to function) and stuff's getting cleaned up in arbitrary order, the snapshotting should cure it, as it's a one-way reference. But since I can't recreate the exact symptoms you're seeing, it's hard for me to be sure... ChrisA -- https://mail.python.org/mailman/listinfo/python-list