diff options
| author | Julien Castiaux <juc@odoo.com> | 2019-09-05 11:50:17 +0000 |
|---|---|---|
| committer | Julien Castiaux <juc@odoo.com> | 2019-09-11 08:10:51 +0000 |
| commit | a7a63bdb4a933fb54e78c3176e37ffca0e457735 (patch) | |
| tree | 3dc3555584c20bc2aa65f921daba243cd1a7ab06 /doc | |
| parent | 2e4841045464e802b516777e7e91b46719b00204 (diff) | |
[REF] doc: remove deprecated modules
[PEP 594] is going deprecates the `imp` standard modules in
PY3.8 in order to completely remove them in PY3.10.
The `imp` module provides the `new_module` function. It returns a new
module created solely using its name. The `types.ModuleName` is a
drop-in replacement.
Task: 2003936
[PEP 594]: https://www.python.org/dev/peps/pep-0594/\#imp
closes odoo/odoo#36463
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/_extensions/odoo_ext/pygments_override.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/_extensions/odoo_ext/pygments_override.py b/doc/_extensions/odoo_ext/pygments_override.py index d03fb4f0ebc..aa03003c0f1 100644 --- a/doc/_extensions/odoo_ext/pygments_override.py +++ b/doc/_extensions/odoo_ext/pygments_override.py @@ -118,9 +118,9 @@ class OdooStyle(Style): Generic.Traceback: "", } -import imp +import types import sys modname = 'pygments.styles.odoo' -m = imp.new_module(modname) +m = types.ModuleType(modname) m.OdooStyle = OdooStyle sys.modules[modname] = m |
