]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] 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:42:19 +0000 (08:42 +0200)
committerGitHub <noreply@github.com>
Sat, 14 Oct 2023 06:42:19 +0000 (06:42 +0000)
commita2cc9a4c3a979380b343239c5bb929a1eaada427
tree8820f61e12140fce03694b229465045a0862b074
parent12b9cb80be5e75e63bae7c63053f334705d2de90
[3.12] gh-109747: Improve errors for unsupported look-behind patterns (GH-109859) (GH-110859)

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