From 0d9b08633dfc30346da99c29bf26ca8e4c40294b Mon Sep 17 00:00:00 2001 From: Jiaqing Zhao Date: Wed, 7 Jun 2023 08:06:02 +0000 Subject: [PATCH] doc: remove usage of sre_constants in filter-known-issues.py sre_constants is an undocumented module that deprecated in python 3.11. The sre_constants.error exception is also exposed through re.error, this documented one should be used instead. Tracked-On: #8425 Signed-off-by: Jiaqing Zhao Reviewed-by: Junjie Mao --- doc/scripts/filter-known-issues.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/scripts/filter-known-issues.py b/doc/scripts/filter-known-issues.py index b60c9f0dc..aeb7ac73f 100755 --- a/doc/scripts/filter-known-issues.py +++ b/doc/scripts/filter-known-issues.py @@ -36,7 +36,6 @@ import logging import mmap import os import re -import sre_constants import sys import traceback @@ -69,7 +68,7 @@ def config_import_file(filename): regex = gd['regex'] try: r = re.compile(regex, re.MULTILINE) - except sre_constants.error as e: + except re.error as e: logging.error("%s: bytes %d-%d: bad regex: %s", filename, m.start(), m.end(), e) raise