Skip to content
Snippets Groups Projects
Commit 6394a997 authored by Sergey Bronnikov's avatar Sergey Bronnikov Committed by Kirill Yukhin
Browse files

test: get rid of iteritems()

For Python 3, PEP 3106 changed the design of the dict builtin and the
mapping API in general to replace the separate list based and iterator
based APIs in Python 2 with a merged, memory efficient set and multiset
view based API. This new style of dict iteration was also added to the
Python 2.7 dict type as a new set of iteration methods. PEP-0469 [1]
recommends to replace d.iteritems() to iter(d.items()) to make code
compatible with Python 3.

1. https://www.python.org/dev/peps/pep-0469/

Part of #5538
parent 5c24c5ae
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,7 @@ def read_handle(env, response):
body = ["Not Found"]
if env["PATH_INFO"] in paths:
code, body, headers = paths[env["PATH_INFO"]]()
for key,value in env.iteritems():
for key,value in iter(env.items()):
if "HTTP_" in key:
headers.append((key[5:].lower(), value))
response(code, headers)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment