]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-109747: Improve errors for unsupported look-behind patterns (GH-109859)
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 14 Oct 2023 06:13:02 +0000 (09:13 +0300)
committerGitHub <noreply@github.com>
Sat, 14 Oct 2023 06:13:02 +0000 (09:13 +0300)
commite2b3d831fd2824d8a5713e3ed2a64aad0fb6b62d
tree3ab33a7a92325e48c5297ba9c3f4d8d9c38d3d00
parentca0f3d858d069231ce7c5b382790a774f385b467
gh-109747: Improve errors for unsupported look-behind patterns (GH-109859)

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).
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