Skip to content
Snippets Groups Projects
Commit 0067c081 authored by Christophe Simonis's avatar Christophe Simonis
Browse files

[FIX] core: harden the legacy `migrations` package matching regex


Since odoo/odoo#122569, we now try to import the `migrations`
sub-package of each module to find upgrade tests.
However, this badly written regex match the OCA module `base_maintenance`,
which generate a RecursionError.

closes odoo/odoo#136398

X-original-commit: abd9e668
Signed-off-by: default avatarChristophe Simonis (chs) <chs@odoo.com>
parent 6b27a6f8
No related branches found
No related tags found
No related merge requests found
......@@ -92,7 +92,7 @@ class UpgradeHook(object):
"""Makes the legacy `migrations` package being `odoo.upgrade`"""
def find_module(self, name, path=None):
if re.match(r"^odoo.addons.base.maintenance.migrations\b", name):
if re.match(r"^odoo\.addons\.base\.maintenance\.migrations\b", name):
# We can't trigger a DeprecationWarning in this case.
# In order to be cross-versions, the multi-versions upgrade scripts (0.0.0 scripts),
# the tests, and the common files (utility functions) still needs to import from the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment