|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH 1/8] python/qapi: correct re.Match type hints for 3.13 |
Date: | Tue, 20 Aug 2024 12:19:50 +0200 |
User-agent: | Mozilla Thunderbird |
On 20/8/24 02:23, John Snow wrote:
typing.Match was removed in Python 3.13, so we need to use re.Match instead. However, Python 3.8 doesn't support using re.Match as a type hint directly, so we need a conditional for now. The import is written oddly so that "Match" is explicitly re-exported for re-use by other modules. mypy will complain otherwise. Signed-off-by: John Snow <jsnow@redhat.com> --- scripts/qapi/common.py | 10 +++++++++- scripts/qapi/parser.py | 3 +-- 2 files changed, 10 insertions(+), 3 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
[Prev in Thread] | Current Thread | [Next in Thread] |