From 57162547e023aebf2a6d0ec58d4ece0565dbd5b3 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 17 Nov 2022 10:30:04 +0100 Subject: [PATCH] [FIX] runbot_merge: Odoo 15.0 + Py3.10 compat Turns out I was running "15.0" except just on the runbot, enterprise and community were still the 14.0 repos, so some of the changes were missing. While at it, bundle fixes for 3.10, as that's what Jammy needs, and the mergebot/15.0 will be running on that. --- conftest.py | 2 +- runbot_merge/__manifest__.py | 8 ++++++++ runbot_merge/github.py | 5 ++--- runbot_merge/models/project_freeze/views.xml | 6 ------ runbot_merge/views/templates.xml | 6 ------ 5 files changed, 11 insertions(+), 16 deletions(-) diff --git a/conftest.py b/conftest.py index e915632a..20678ef3 100644 --- a/conftest.py +++ b/conftest.py @@ -1075,7 +1075,7 @@ class Environment: for xid in crons: t0 = time.time() print('\trunning cron', xid, '...', file=sys.stderr) - _, model, cron_id = self('ir.model.data', 'xmlid_lookup', xid) + model, cron_id = self('ir.model.data', 'check_object_reference', *xid.split('.', 1)) assert model == 'ir.cron', "Expected {} to be a cron, got {}".format(xid, model) self('ir.cron', 'method_direct_trigger', [cron_id], **kw) print('\tdone %.3fs' % (time.time() - t0), file=sys.stderr) diff --git a/runbot_merge/__manifest__.py b/runbot_merge/__manifest__.py index 9f44e106..770bd488 100644 --- a/runbot_merge/__manifest__.py +++ b/runbot_merge/__manifest__.py @@ -15,6 +15,14 @@ 'views/templates.xml', 'models/project_freeze/views.xml', ], + 'assets': { + 'web.assets_frontend': [ + 'runbot_merge/static/scss/runbot_merge.scss', + ], + 'web.assets_backend': [ + 'runbot_merge/static/project_freeze/index.js', + ], + }, 'post_load': 'enable_sentry', 'pre_init_hook': '_check_citext', 'license': 'LGPL-3', diff --git a/runbot_merge/github.py b/runbot_merge/github.py index c36a2ebf..e1f43781 100644 --- a/runbot_merge/github.py +++ b/runbot_merge/github.py @@ -1,4 +1,4 @@ -import collections +import collections.abc import itertools import json as json_ import logging @@ -8,7 +8,6 @@ import pathlib import pprint import textwrap import unicodedata -from datetime import datetime, timezone import requests import werkzeug.urls @@ -114,7 +113,7 @@ class GH(object): ) self._log_gh(_gh, method, path, params, json, r) if check: - if isinstance(check, collections.Mapping): + if isinstance(check, collections.abc.Mapping): exc = check.get(r.status_code) if exc: raise exc(r.text) diff --git a/runbot_merge/models/project_freeze/views.xml b/runbot_merge/models/project_freeze/views.xml index de0836cb..d6b7c301 100644 --- a/runbot_merge/models/project_freeze/views.xml +++ b/runbot_merge/models/project_freeze/views.xml @@ -1,10 +1,4 @@ - - Freeze Wizard Configuration Screen runbot_merge.project.freeze diff --git a/runbot_merge/views/templates.xml b/runbot_merge/views/templates.xml index 0e455f2e..0f3f662f 100644 --- a/runbot_merge/views/templates.xml +++ b/runbot_merge/views/templates.xml @@ -4,12 +4,6 @@ - -