summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--paste/httpexceptions.py2
-rw-r--r--paste/httpheaders.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/paste/httpexceptions.py b/paste/httpexceptions.py
index 2c0c020..492f558 100644
--- a/paste/httpexceptions.py
+++ b/paste/httpexceptions.py
@@ -587,7 +587,7 @@ class HTTPVersionNotSupported(HTTPServerError):
__all__ = ['HTTPException', 'HTTPRedirection', 'HTTPError' ]
_exceptions = {}
-for name, value in six.iteritems(globals()):
+for name, value in six.iteritems(dict(globals())):
if (isinstance(value, (type, six.class_types)) and
issubclass(value, HTTPException) and
value.code):
diff --git a/paste/httpheaders.py b/paste/httpheaders.py
index 7c57c29..702e596 100644
--- a/paste/httpheaders.py
+++ b/paste/httpheaders.py
@@ -136,6 +136,7 @@ dashes to give CamelCase style names.
"""
import mimetypes
import re
+import six
from time import time as now
try:
# Python 3
@@ -171,7 +172,7 @@ REQUEST_METHOD = EnvironVariable("REQUEST_METHOD")
SCRIPT_NAME = EnvironVariable("SCRIPT_NAME")
PATH_INFO = EnvironVariable("PATH_INFO")
-for _name, _obj in six.iteritems(globals()):
+for _name, _obj in six.iteritems(dict(globals())):
if isinstance(_obj, EnvironVariable):
__all__.append(_name)
@@ -1099,6 +1100,6 @@ for head in _headers.values():
__all__.append(headname)
__pudge_all__ = __all__[:]
-for _name, _obj in six.iteritems(globals()):
+for _name, _obj in six.iteritems(dict(globals())):
if isinstance(_obj, type) and issubclass(_obj, HTTPHeader):
__pudge_all__.append(_name)