Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Python 3 compatibility bug in pickler.py
sys.modules changes during iteration. It seems that the intention was to make a copy using sys.modules.values(), which returns a copy in Python 2, but a view in Python 3. Partial list of modules observed as added during iteration: ```python {<module 'py._log' from '/home/ehudm/src/beam/sdks/python/target/.tox/py3-pytest/lib/python3.5/site-packages/py/_log/__init__.py'>, <module 'syslog' (built-in)>, <module 'py._log.log' from '/home/ehudm/src/beam/sdks/python/target/.tox/py3-pytest/lib/python3.5/site-packages/py/_log/log.py'>, <module 'py._log.warning' from '/home/ehudm/src/beam/sdks/python/target/.tox/py3-pytest/lib/python3.5/site-packages/py/_log/warning.py'>} {<module 'py._process.forkedfunc' from '/home/ehudm/src/beam/sdks/python/target/.tox/py3-pytest/lib/python3.5/site-packages/py/_process/forkedfunc.py'>, <module 'py._process.killproc' from '/home/ehudm/src/beam/sdks/python/target/.tox/py3-pytest/lib/python3.5/site-packages/py/_process/killproc.py'>, <module 'py._process.cmdexec' from '/home/ehudm/src/beam/sdks/python/target/.tox/py3-pytest/lib/python3.5/site-packages/py/_process/cmdexec.py'>, <module 'py._process' from '/home/ehudm/src/beam/sdks/python/target/.tox/py3-pytest/lib/python3.5/site-packages/py/_process/__init__.py'>} {<module 'py._path.cacheutil' from '/home/ehudm/src/beam/sdks/python/target/.tox/py3-pytest/lib/python3.5/site-packages/py/_path/cacheutil.py'>, <module 'py._path.svnurl' from '/home/ehudm/src/beam/sdks/python/target/.tox/py3-pytest/lib/python3.5/site-packages/py/_path/svnurl.py'>, <module 'py._path.svnwc' from '/home/ehudm/src/beam/sdks/python/target/.tox/py3-pytest/lib/python3.5/site-packages/py/_path/svnwc.py'>} ```
- Loading branch information