[gcc r17-2623] Fix maintainer_utils.py for older jsonscheme [PR126162]

Andrea Pinski via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:345dcca9c7235c7e0cb23abbed4f83f6dd248dad

commit r17-2623-g345dcca9c7235c7e0cb23abbed4f83f6dd248dad
Author: Andrea Pinski <[email protected]>
Date:   Tue Jul 21 11:25:34 2026 -0700

    Fix maintainer_utils.py for older jsonscheme [PR126162]
    
    Some semi-older distros don't have a new enough jsonscheme
    installed. So this moves the scheme to the older json scheme
    rather than using the 2020 one.
    
            PR testsuite/126162
    contrib/ChangeLog:
    
            * maintainer_utils.py: Move to the older scheme which
            is valid for MAINTAINERS.yml.
    
    Signed-off-by: Andrea Pinski <[email protected]>
    Co-authored-by: Arsen Arsenović <[email protected]>

Diff:
---
 contrib/maintainer_utils.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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}")
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.