From 52f5528cfb6d1152ee226e268247dc685a8ba329 Mon Sep 17 00:00:00 2001 From: Adrian Torres Date: Thu, 8 Nov 2018 15:27:30 +0000 Subject: [REF] *: replace deprecated pycompat helpers for builtins This commit replaces calls to pycompat helpers that were intended for python 2 <-> python 3 interoperability for python 3 builtins, as python 2 is no longer officially supported by Odoo. This includes: * calls to imap/izip/ifilter replaced by map/zip/filter * uses of text_type replaced by str * uses of unichr replaced by chr * calls to implements_to_string, implements_iterator removed * string_types and integer_types replaced by str, int respectively * calls to to_native replaced by calls to to_text This is done in preparation to the removal of these deprecated helpers in the following commit. --- odoo/tools/float_utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'odoo/tools/float_utils.py') diff --git a/odoo/tools/float_utils.py b/odoo/tools/float_utils.py index 041a87cabbe..c5c2946a5ce 100644 --- a/odoo/tools/float_utils.py +++ b/odoo/tools/float_utils.py @@ -4,7 +4,6 @@ from __future__ import print_function import math -from odoo.tools import pycompat if not pycompat.PY2: import builtins @@ -224,7 +223,7 @@ if __name__ == "__main__": expecteds = ['.00', '.02', '.01', '.68', '.67', '.46', '.456', '.4556'] precisions = [2, 2, 2, 2, 2, 2, 3, 4] for magnitude in range(7): - for frac, exp, prec in pycompat.izip(fractions, expecteds, precisions): + for frac, exp, prec in zip(fractions, expecteds, precisions): for sign in [-1,1]: for x in range(0, 10000, 97): n = x * 10**magnitude -- cgit v1.2.3