summaryrefslogtreecommitdiff
path: root/odoo/modules
diff options
context:
space:
mode:
authorAdrian Torres <adt@odoo.com>2018-11-08 15:27:30 +0000
committerAdrian Torres <adt@odoo.com>2018-11-29 09:28:17 +0000
commit52f5528cfb6d1152ee226e268247dc685a8ba329 (patch)
treeb44ecfa477b50dd3e488f09f623eecc8bc8e9d7d /odoo/modules
parente5c864a596b72515837f0ed1e07550398ecc1ab0 (diff)
[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.
Diffstat (limited to 'odoo/modules')
-rw-r--r--odoo/modules/migration.py1
-rw-r--r--odoo/modules/module.py4
2 files changed, 2 insertions, 3 deletions
diff --git a/odoo/modules/migration.py b/odoo/modules/migration.py
index 57d217e770d..4081232b5ff 100644
--- a/odoo/modules/migration.py
+++ b/odoo/modules/migration.py
@@ -13,7 +13,6 @@ from odoo.modules.module import get_resource_path
import odoo.release as release
import odoo.tools as tools
from odoo.tools.parse_version import parse_version
-from odoo.tools import pycompat
if pycompat.PY2:
import imp
diff --git a/odoo/modules/module.py b/odoo/modules/module.py
index 93be467b0f3..4f7f80ca396 100644
--- a/odoo/modules/module.py
+++ b/odoo/modules/module.py
@@ -324,13 +324,13 @@ def load_information_from_description_file(module, mod_path=None):
'summary': '',
'website': '',
}
- info.update(pycompat.izip(
+ info.update(zip(
'depends data demo test init_xml update_xml demo_xml'.split(),
iter(list, None)))
f = tools.file_open(manifest_file, mode='rb')
try:
- info.update(ast.literal_eval(pycompat.to_native(f.read())))
+ info.update(ast.literal_eval(pycompat.to_text(f.read())))
finally:
f.close()