[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#136549 X-original-commit: abd9e6686bdb1f84d67bd536d9cecda627cd001a Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
This commit is contained in:
@@ -68,7 +68,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
|
||||
|
||||
Reference in New Issue
Block a user