Author: Armin Rigo <ar...@tunes.org>
Branch: py3.5
Changeset: r87738:d6159e4d8aa9
Date: 2016-10-12 21:26 +0200
http://bitbucket.org/pypy/pypy/changeset/d6159e4d8aa9/

Log:    Almost-fix

diff --git a/lib-python/3/importlib/_bootstrap.py 
b/lib-python/3/importlib/_bootstrap.py
--- a/lib-python/3/importlib/_bootstrap.py
+++ b/lib-python/3/importlib/_bootstrap.py
@@ -187,8 +187,9 @@
             lock = _DummyModuleLock(name)
         else:
             lock = _ModuleLock(name)
-        def cb(_):
-            del _module_locks[name]
+        def cb(wr):
+            if _module_locks.get(name) is wr:    # XXX PyPy fix?
+                del _module_locks[name]
         _module_locks[name] = _weakref.ref(lock, cb)
     return lock
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to