Fixing DeprecationWarning: distutils Version classes are deprecated. … #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…Use packaging.version instead.
As reported in this issue, odoo#83878, when starting the server also in v15 there is an annoying warning as follows
py.warnings odoo/addons/base/models/ir_actions_report.py:73: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
File "./odoo-bin", line 8, in
odoo.cli.main()
File "odoo/cli/command.py", line 61, in main
o.run(args)
File "odoo/cli/server.py", line 176, in run
main(args)
File "odoo/cli/server.py", line 170, in main
rc = odoo.service.server.start(preload=preload, stop=stop)
File "odoo/service/server.py", line 1286, in start
load_server_wide_modules()
File "odoo/service/server.py", line 1196, in load_server_wide_modules
odoo.modules.module.load_openerp_module(m)
File "odoo/modules/module.py", line 396, in load_openerp_module
import('odoo.addons.' + module_name)
File "odoo/addons/base/init.py", line 5, in
from . import models
File "odoo/addons/base/models/init.py", line 13, in
from . import ir_actions_report
File "odoo/addons/base/models/ir_actions_report.py", line 73, in
if LooseVersion(version) >= LooseVersion('0.12.2'):
This commit fixes that.
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr