]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-109747: Improve errors for unsupported look-behind patterns (GH-109859...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 14 Oct 2023 06:51:24 +0000 (08:51 +0200)
committerGitHub <noreply@github.com>
Sat, 14 Oct 2023 06:51:24 +0000 (06:51 +0000)
commit1c26f1ce6c3965b1f7395b60bf45d7fc0bc6de57
tree7b21413abb2dd08da7eedef320eb2b62bcae3a7d
parent035f9e0cc5ecda552a7326186cabbcd4dda5408d
[3.11] gh-109747: Improve errors for unsupported look-behind patterns (GH-109859) (GH-110860)

Now re.error is raised instead of OverflowError or RuntimeError for
too large width of look-behind pattern.

The limit is increased to 2**32-1 (was 2**31-1).
(cherry picked from commit e2b3d831fd2824d8a5713e3ed2a64aad0fb6b62d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/re/_compiler.py
Lib/re/_parser.py
Lib/test/test_re.py
Misc/NEWS.d/next/Library/2023-09-25-20-05-41.gh-issue-109747._cRJH8.rst [new file with mode: 0644]
Modules/_sre/sre.c
Modules/_sre/sre_lib.h