From 3bb81c139b6a7aff397a001948d518aa9c4bfebb Mon Sep 17 00:00:00 2001 From: Max Muoto Date: Thu, 11 Jul 2024 19:07:11 -0500 Subject: [PATCH] `SRE_FLAG_TEMPLATE` removed in 3.13 (#12322) --- stdlib/@tests/stubtest_allowlists/py313.txt | 3 --- stdlib/sre_constants.pyi | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/stdlib/@tests/stubtest_allowlists/py313.txt b/stdlib/@tests/stubtest_allowlists/py313.txt index dc0f035ae..3c4ca8ee0 100644 --- a/stdlib/@tests/stubtest_allowlists/py313.txt +++ b/stdlib/@tests/stubtest_allowlists/py313.txt @@ -82,9 +82,6 @@ os.path.splitroot # `__replace__` to be special cased in dataclasses pstats.FunctionProfile.__replace__ pstats.StatsProfile.__replace__ -sre_compile.SRE_FLAG_TEMPLATE -sre_constants.SRE_FLAG_TEMPLATE -sre_parse.SRE_FLAG_TEMPLATE tkinter.Misc.after_info tkinter.Misc.busy tkinter.Misc.busy_cget diff --git a/stdlib/sre_constants.pyi b/stdlib/sre_constants.pyi index d522372c4..0c1e484bb 100644 --- a/stdlib/sre_constants.pyi +++ b/stdlib/sre_constants.pyi @@ -30,7 +30,8 @@ AT_LOCALE: dict[_NamedIntConstant, _NamedIntConstant] AT_UNICODE: dict[_NamedIntConstant, _NamedIntConstant] CH_LOCALE: dict[_NamedIntConstant, _NamedIntConstant] CH_UNICODE: dict[_NamedIntConstant, _NamedIntConstant] -SRE_FLAG_TEMPLATE: int +if sys.version_info < (3, 13): + SRE_FLAG_TEMPLATE: int SRE_FLAG_IGNORECASE: int SRE_FLAG_LOCALE: int SRE_FLAG_MULTILINE: int