Skip to content
Permalink
Browse files

Fix "dictionary changed size during iteration"

env is being modified at the same time as being iterated which leads to RuntimeError: dictionary changed size during iteration.
  • Loading branch information...
vmarkovtsev committed Nov 1, 2015
1 parent ae6c73f commit 57ebfa41e0f96b97e599ecd931b7ae8a143e096e
Showing with 1 addition and 1 deletion.
  1. +1 −1 pkg_resources/__init__.py
@@ -1536,7 +1536,7 @@ def _markerlib_evaluate(cls, text):
# markerlib implements Metadata 1.2 (PEP 345) environment markers.
# Translate the variables to Metadata 2.0 (PEP 426).
env = _markerlib.default_environment()
for key in env.keys():
for key in tuple(env.keys()):
new_key = key.replace('.', '_')
env[new_key] = env.pop(key)
try:

0 comments on commit 57ebfa4

Please sign in to comment.
You can’t perform that action at this time.