From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id B4DBF4765E4 for ; Wed, 23 Dec 2020 15:36:42 +0300 (MSK) From: sergeyb@tarantool.org Date: Wed, 23 Dec 2020 15:36:10 +0300 Message-Id: <9f16ab29ec24d78458371a376e03f098b7d32a39.1608726409.git.estetus@gmail.com> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v3 4/5] test: get rid of iteritems() List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org, lvasiliev@tarantool.org Cc: Sergey Bronnikov From: Sergey Bronnikov 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 --- test/app-tap/httpd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/app-tap/httpd.py b/test/app-tap/httpd.py index b57ef1e39..a2dee1b83 100755 --- a/test/app-tap/httpd.py +++ b/test/app-tap/httpd.py @@ -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) -- 2.25.1