https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126162
--- Comment #4 from Arsen Arsenović <arsen at gcc dot gnu.org> ---
(In reply to Richard Earnshaw from comment #2)
> I was expecting that anybody updating the MAINTAINERS file would have a
> recent enough version of jsonschema to be able to handle a schema from 2020;
> but I guess this could be a problem when running the testsuite on older
> machines.
>
> I'm not an expert on schemas, so if somebody can specify something that's
> more portable I'll happily review a patch.
why not:
diff --git a/contrib/maintainer_utils.py b/contrib/maintainer_utils.py
index c4d6c8da073f..9fc636d8b562 100755
--- a/contrib/maintainer_utils.py
+++ b/contrib/maintainer_utils.py
@@ -37,7 +37,7 @@ except:
label_pattern = '[a-zA-Z][-+a-zA-Z0-9]*(/[a-zA-Z][-+a-zA-Z0-9]*)+'
maintainer_schema = {
- '$schema': 'https://json-schema.org/draft/2020-12/schema',
+ '$schema': 'https://json-schema.org/draft-04/schema',
'type': 'object',
'properties': {
'users': {
@@ -207,7 +207,7 @@ def _format_path(path, data):
def _check_schema(data):
try:
- schema = jsonschema.validators.Draft202012Validator(maintainer_schema)
+ schema = jsonschema.validators.Draft4Validator(maintainer_schema)
errors = sorted(schema.iter_errors(data), key=lambda e: e.path)
for err in errors:
_error(f"{_format_path(err.path, data)}: {err.message}")
... in line with what I suggested above