From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3FF8B13877A for ; Mon, 11 Aug 2014 21:07:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AAC97E0CFF; Mon, 11 Aug 2014 21:06:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3D512E0CFE for ; Mon, 11 Aug 2014 21:06:58 +0000 (UTC) Received: from pomiot.lan (77-255-25-239.adsl.inetia.pl [77.255.25.239]) (using SSLv3 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 60AF13402A1; Mon, 11 Aug 2014 21:06:54 +0000 (UTC) Date: Mon, 11 Aug 2014 23:06:04 +0200 From: =?ISO-8859-2?B?TWljaGGzIEfzcm55?= To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH] localized_size(): fix rounding in Python 2. Message-ID: <20140811230604.35727d99@pomiot.lan> In-Reply-To: <1407345160-16866-1-git-send-email-mgorny@gentoo.org> References: <1407345160-16866-1-git-send-email-mgorny@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.24; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/PbY3A.RgKrLLraWkZg8I1w_"; protocol="application/pgp-signature" X-Archives-Salt: 50d09b9c-a3ad-49a6-8491-cff1217c67f8 X-Archives-Hash: f6c5afa7cb2c51d13de658529516065c --Sig_/PbY3A.RgKrLLraWkZg8I1w_ Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable Dnia 2014-08-06, o godz. 19:12:40 Micha=B3 G=F3rny napisa=B3(a): > In Python 2, the '/' division operator defaults to integer division when > given integer argument. Therefore, the calculated size is trimmed before > we attempt to round it up. Instead, convert it to float first to > guarantee floating point division. This one got superseded by the __future__ division patch. --=20 Best regards, Micha=B3 G=F3rny --Sig_/PbY3A.RgKrLLraWkZg8I1w_ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJT6TA8XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2REJCMDdDQzRGMERBRDA2RUEwQUZFNDFC MDdBMUFFQUVGQjQ0NjRFAAoJELB6GurvtEZOnbgQAK0ND8NPHYBfyohcdgO1oDQP cZD7ufjEuet0BMnSCqeUSZ0WShCAhdq9PaZ/08WrCw/8G/yWwUoA0TDAxgr4J7Z7 D34+hCouQEbdhf+ouPicMlo0IgbBEA5owc49SNYEW+X0uS08bmSyS9Kki0dbb3l1 LN76AC3DG76BtsD2K7rSuCLdX4b5dcmIgkozrcY6HGQ9AMQpGMMqZ3RfY74CE7iH O87eA+t4GFbUb3b876ypJjcSgsgzK6olXNm9ujKJRZtag1h1UNF7ZMo8M52lQe9B 9SaUlBDkFPNY738defLf5OVWVFzNApawI8iih5u1ARztjB1XBTc5IbEbfGU+Xrti IVy/fp328G8UJ2U1yFIPurgKBdvZmlp0fO+NycruII6K6H5zJpbZhd2NeWAwP3GJ 2zJIrOda8FiVNt4gQ3hPxLM9Ra+2+AwjQI9/nApxTPR/k3ELu2cwu8ncim9Sdfti tOi1acpGkVnapJItwaQGbzKSI4GtLiDQYo08hQe34P/DrastPArPXJMGf7K/ma/5 t9cX3mvydV8HLhHay5oSLOLkS1UdMzCIx9VQDRyvveNVi7a+NHEv52KQuK0CIIpO C26/R9QO/+tnzVTgSboWW00DuCs1Gx43korKJQtQ1pe77CEmhSJMXzR3q+qHwUms bayYwHzMr06Y8swZT5R1 =1vjt -----END PGP SIGNATURE----- --Sig_/PbY3A.RgKrLLraWkZg8I1w_--