From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 20A5B4C885; Thu, 14 Jan 2021 15:52:09 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 20A5B4C885 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1610628729; bh=j7gV0ASSoExgDNijaJ71tVo9gfBg4mzpE2oVMZF2leE=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=bKJURsG+yYgc5nEXOULBRqoG66mWzG2Fr76IcYOxMyw2ETZPCtBvd2PvmvRWV+qYu //nI6xbcg3bTcOklhEYV5pE6H/C5TAJxElHbV32vlq3hO6vFbQbK/U6RVVhxo/5Xn7 NBbnCqNadhur775bioEgrOFV5Ns9O51EWkw0LFoI= Received: from smtp3.mail.ru (smtp3.mail.ru [94.100.179.58]) (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 1AD7B4C885 for ; Thu, 14 Jan 2021 15:52:07 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1AD7B4C885 Received: by smtp3.mail.ru with esmtpa (envelope-from ) id 1l026g-0003Ut-Eu; Thu, 14 Jan 2021 15:52:06 +0300 To: Alexander Turenko References: <20210114122307.c6oekoa45vh73hje@tkn_work_nb> Message-ID: <166276bb-8c56-589f-21d2-09eead7091b0@tarantool.org> Date: Thu, 14 Jan 2021 15:52:06 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210114122307.c6oekoa45vh73hje@tkn_work_nb> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9D0E79FBC973162CD81CC0669AF3BE2AC14A0BAA29BC1501600894C459B0CD1B9919670A840FF4D4DF61D87EA2F90C1C07E70E0EA0DA2217B217A548D7C17D9D2 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7EED5D2FAB4CEB1EDEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006372D850D7477D401F58638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC480310FC876A81A6A2FE63A8A53AA527F1019010768330B5389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C07E7E81EEA8A9722B8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6957A4DEDD2346B42CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C2249AF430C05BE793DC53AA81AA40904B5D9CF19DD082D7633A078D18283394535A93AA81AA40904B5D98AA50765F7900637A3D6CEEA065E27B3EC76A7562686271EEC990983EF5C032935872C767BF85DA29E625A9149C048EE0A3850AC1BE2E73589C8E7BF4648B1764AD6D5ED66289B524E70A05D1297E1BB35872C767BF85DA227C277FBC8AE2E8B6E78021C7477643F75ECD9A6C639B01B4E70A05D1297E1BBC6867C52282FAC85D9B7C4F32B44FF57AA1DF4CB901976EF00306258E7E6ABB4E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A53826B8417C82171C4ABC064F80B03EEC0876E3E42E58723CD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3494FB0335DF05DC3ABB17A9233F4B464392AE06926E880B9E8E215D0AA8614CFC8F68F29E0005F2091D7E09C32AA3244CB0258285F0283C81D152DD4BF4B80CD58A6D4CC6FBFAC251927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj9kdO2HH36x6NVdpJYJuVtg== X-Mailru-Sender: C4F68CFF4024C8867DFDF7C7F2588458ED3F09C7CF34414B46FC82C41D9721C99CDC8A1A2A736FC6282EC151BADDC1D3523A6D01B4765B2DFB59E2DDD9FE06B14FA522850F29BC30112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 1/4] test: fix app-tap/http_client.test.lua X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Cc: Sergey Bronnikov , tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for review! On 14.01.2021 15:23, Alexander Turenko wrote: >> @@ -76,7 +76,7 @@ def post_handle(env, response): >> code = "200 OK" >> body = [env["wsgi.input"].read()] >> headers = [] >> - for key,value in env.iteritems(): >> + for key,value in iter(env.items()): > AFAIR, .items() forms a list on Python 2, but creates an iterator > object on Python 3. Both are suitable for the for loop expression and > there is no much difference when the dictionary in not large. Generally it is so. Although PEP-0469 recommends to convert d.items() to iter(d.iteritems()) [1]. > iter() does not change anything here (however it is harmless). > > .iteritems() was preferred by developers in Python 2 days, because it > creates an iterator, but most of times we know that a dictionary is not > large and we're okay with negligible perf. down on Python 2. I have reverted iter() related changes to reduce a patch. Everything works as is. 1. https://www.python.org/dev/peps/pep-0469/