diff options
| author | xmo-odoo <xmo@odoo.com> | 2017-04-25 13:27:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-25 13:27:54 +0200 |
| commit | 6b9268bd15f8db22855d91849749b879f2d553a1 (patch) | |
| tree | a14ed2a0ff1b4eafb0f94b0dfafcea34187499bf /odoo/tools/parse_version.py | |
| parent | 3cbca4b7348b60eb6cfe3f423983d53dada67862 (diff) | |
[FIX] print statement -> function
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
Diffstat (limited to 'odoo/tools/parse_version.py')
| -rw-r--r-- | odoo/tools/parse_version.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/odoo/tools/parse_version.py b/odoo/tools/parse_version.py index 997590f9b35..348fb3664a6 100644 --- a/odoo/tools/parse_version.py +++ b/odoo/tools/parse_version.py @@ -4,6 +4,7 @@ ## this functions are taken from the setuptools package (version 0.6c8) ## http://peak.telecommunity.com/DevCenter/PkgResources#parsing-utilities +from __future__ import print_function import re component_re = re.compile(r'(\d+ | [a-z]+ | \.| -)', re.VERBOSE) @@ -69,7 +70,7 @@ if __name__ == '__main__': pv = parse_version(v) pvs.append(pv) if verbose: - print v, pv + print(v, pv) for a, b in zip(pvs, pvs[1:]): assert a < b, '%s < %s == %s' % (a, b, a < b) |
