diff options
author | Guido van Rossum <guido@python.org> | 2007-02-26 07:07:02 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-02-26 07:07:02 (GMT) |
commit | 634e53fad4874ce7a4e822a9e93e6a9c616b652a (patch) | |
tree | 19e86cfa9a7ca35b2139959cb0380b75b048656d | |
parent | 032a284752c4258be41a8b6a9658da55bb157273 (diff) | |
download | cpython-634e53fad4874ce7a4e822a9e93e6a9c616b652a.zip cpython-634e53fad4874ce7a4e822a9e93e6a9c616b652a.tar.gz cpython-634e53fad4874ce7a4e822a9e93e6a9c616b652a.tar.bz2 |
Fix a bizarre error where test_pickletools fails if preceded by test_pyclbr.
The fix is in neither, but in pickle.py where a loop over sys.modules.items()
could modify sys.modules, occasionally.
-rw-r--r-- | Lib/pickle.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py index db7f512..3d2ebd2 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -791,7 +791,7 @@ def whichmodule(func, funcname): if func in classmap: return classmap[func] - for name, module in sys.modules.items(): + for name, module in list(sys.modules.items()): if module is None: continue # skip dummy package entries if name != '__main__' and getattr(module, funcname, None) is func: |