diff options
Diffstat (limited to 'odoo/addons/__init__.py')
| -rw-r--r-- | odoo/addons/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/odoo/addons/__init__.py b/odoo/addons/__init__.py index d3a3e7e9ba2..c0058937588 100644 --- a/odoo/addons/__init__.py +++ b/odoo/addons/__init__.py @@ -14,4 +14,7 @@ This module also conveniently reexports some symbols from odoo.modules. Importing them from here is deprecated. """ -__import__('pkg_resources').declare_namespace(__name__) +# make odoo.addons a namespace package, while keeping this __init__.py +# present, for python 2 compatibility +# https://packaging.python.org/guides/packaging-namespace-packages/ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) |
