[issue43714] re.split(), re.sub(): '\Z' must consume end of string if it matched

2021-04-03 Thread Alexander Grigoriev
Alexander Grigoriev added the comment: For example, sed: $ sed --version sed (GNU sed) 4.8 Copyright (C) 2020 Free Software Foundation, Inc. $ sed -e 's/-\?$/x/g' <<<'a-b-' a-bx Perl: $ perl --version This is perl 5, version 32, subversion 0 (v5.32.0) built for x86_64-msys-thr

[issue43714] re.split(), re.sub(): '\Z' must consume end of string if it matched

2021-04-03 Thread Alexander Grigoriev
New submission from Alexander Grigoriev : If '\Z' matches as part of a pattern in re.sub() or re.split(), it should consume the end of string, and then '\Z' alone should not match the end of string again. Current behavior: Python 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v

[issue43686] re.match appears to hang with certain combinations of pattern and string

2021-03-31 Thread Alexander Grigoriev
New submission from Alexander Grigoriev : Certain patterns and input strings cause re.match to take exponentially longer time. This can be expected because of recursive nature of matching some patterns, but it can take surprisingly long time with some combination of a pattern and input data

[issue35935] threading.Event().wait() not interruptable with Ctrl-C on Windows

2021-03-03 Thread Alexander Grigoriev
Alexander Grigoriev added the comment: @ericsun: Windows calls the console event handler in a separate thread. The console event handler receives CTRL_C_EVENT, CTRL_BREAK_EVENT, console close, logoff, system shutdown events. Originally, Windows devised an APC mechanism to simulate