Rebind locally the globals which can be looked up at shutdown
(to avoid the warnings seen on a buildbot)
diff --git a/Lib/multiprocessing/util.py b/Lib/multiprocessing/util.py
index b59ac9f..c487180 100644
--- a/Lib/multiprocessing/util.py
+++ b/Lib/multiprocessing/util.py
@@ -188,7 +188,11 @@
_finalizer_registry[self._key] = self
- def __call__(self, wr=None):
+ def __call__(self, wr=None,
+ # Need to bind these locally because the globals can have
+ # been cleared at shutdown
+ _finalizer_registry=_finalizer_registry,
+ sub_debug=sub_debug):
'''
Run the callback unless it has already been called or cancelled
'''