From 994dfd9ee749b71a2c02b08d16403afd62c55118 Mon Sep 17 00:00:00 2001 From: Semyon Moroz Date: Sun, 25 May 2025 16:11:46 +0000 Subject: [PATCH] Add `CH_NEGATE` dict to `sre_*` modules (#14136) Co-authored-by: Jelle Zijlstra --- stdlib/@tests/stubtest_allowlists/py314.txt | 3 --- stdlib/sre_constants.pyi | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/stdlib/@tests/stubtest_allowlists/py314.txt b/stdlib/@tests/stubtest_allowlists/py314.txt index f634f09ae..c72585f10 100644 --- a/stdlib/@tests/stubtest_allowlists/py314.txt +++ b/stdlib/@tests/stubtest_allowlists/py314.txt @@ -63,9 +63,6 @@ multiprocessing.managers._BaseDictProxy.fromkeys multiprocessing.process.BaseProcess.interrupt multiprocessing.synchronize.SemLock.locked shutil.__all__ -sre_compile.CH_NEGATE -sre_constants.CH_NEGATE -sre_parse.CH_NEGATE string.Template.flags tarfile.TarFile.zstopen tkinter.Event.__class_getitem__ diff --git a/stdlib/sre_constants.pyi b/stdlib/sre_constants.pyi index c41a52b26..a3921aa0f 100644 --- a/stdlib/sre_constants.pyi +++ b/stdlib/sre_constants.pyi @@ -23,6 +23,8 @@ AT_LOCALE: dict[_NamedIntConstant, _NamedIntConstant] AT_UNICODE: dict[_NamedIntConstant, _NamedIntConstant] CH_LOCALE: dict[_NamedIntConstant, _NamedIntConstant] CH_UNICODE: dict[_NamedIntConstant, _NamedIntConstant] +if sys.version_info >= (3, 14): + CH_NEGATE: dict[_NamedIntConstant, _NamedIntConstant] # flags if sys.version_info < (3, 13): SRE_FLAG_TEMPLATE: Final = 1