summaryrefslogtreecommitdiff
path: root/odoo/tools/parse_version.py
AgeCommit message (Collapse)Author
2017-05-10[FIX] P3: list -> iterable builtins (#16811)xmo-odoo
In Python 3: * various builtins and dict methods were changed to return view/iterable objects rather than lists * and the separate Python 2 view/iterable builtins and methods were removed altogether This is problematic when using these items as list (which the happens repeatedly in Odoo), but more viciously when iterating *multiple times* over them (which also happens, which I've messed up multiple times while writing this, and which is a pain to debug even when you've just created the issue). Convert all code using these to semantics-matching cross-version helper functions to get the LCD behaviour between P2 and P3, and forbid the builtins via lint. issue #8530
2017-04-25[FIX] print statement -> functionxmo-odoo
In Python 3, ``print`` becomes a builtin function. This is available in Python 2 by importing the ``print_function`` feature from ``__future__``, the feature is conveniently still available in Python 3 (it just does nothing). Fixers: libfuturize.fixes.fix_print_with_import #8530
2017-04-12[#8530] fix uses of ``reduce`` builtinXavier Morel
Demoted to library in Python 3, see if uses can be replaced by more specific construct, just import functools.reduce otherwise. Futurize fixers: * lib2to3.fixes.fix_reduce
2016-09-02[REF] openerp: move `openerp` to `odoo`Raphael Collet