summaryrefslogtreecommitdiffstats
path: root/Lib/re/_compiler.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-126505: Fix bugs in compiling case-insensitive character classes (GH-126557)Serhiy Storchaka2024-11-111-9/+14
| | | | | * upper-case non-BMP character was ignored * the ASCII flag was ignored when matching a character range whose upper bound is beyond the BMP region
* gh-111259: Optimize complementary character sets in RE (GH-120742)Serhiy Storchaka2024-06-201-13/+27
| | | | | Patterns like "[\s\S]" or "\s|\S" which match any character are now compiled to the same effective code as a dot with the DOTALL modifier ("(?s:.)").
* GH-83162: Rename re.error for better clarity. (#101677)achhina2023-12-111-3/+3
| | | | | | | | | Renamed re.error for clarity, and kept re.error for backward compatibility. Updated idlelib files at TJR's request. --------- Co-authored-by: Matthias Bussonnier <mbussonnier@ucmerced.edu> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-109747: Improve errors for unsupported look-behind patterns (GH-109859)Serhiy Storchaka2023-10-141-1/+3
| | | | | | 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).
* gh-100061: Proper fix of the bug in the matching of possessive quantifiers ↵SKO2023-08-161-7/+0
| | | | | | | | (GH-102612) Restore the global Input Stream pointer after trying to match a sub-pattern. Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
* gh-106052: Fix bug in the matching of possessive quantifiers (gh-106515)Serhiy Storchaka2023-08-091-0/+7
| | | | | | It did not work in the case of a subpattern containing backtracking. Temporary implement possessive quantifiers as equivalent greedy qualifiers in atomic groups.
* gh-105687: Remove deprecated objects from `re` module (#105688)Nikita Sobolev2023-06-141-2/+0
|
* gh-91404: Revert "bpo-23689: re module, fix memory leak when a match is ↵Gregory P. Smith2022-06-171-38/+21
| | | | | | | | | | | | terminated by a signal or allocation failure (GH-32283) (#93882) Revert "bpo-23689: re module, fix memory leak when a match is terminated by a signal or memory allocation failure (GH-32283)" This reverts commit 6e3eee5c11b539e9aab39cff783acf57838c355a. Manual fixups to increase the MAGIC number and to handle conflicts with a couple of changes that landed after that. Thanks for reviews by Ma Lin and Serhiy Storchaka.
* gh-92728: Restore re.template, but deprecate it (GH-93161)Miro Hrončok2022-05-251-0/+2
| | | | | | Revert "bpo-47211: Remove function re.template() and flag re.TEMPLATE (GH-32300)" This reverts commit b09184bf05b07b77c5ecfedd4daa846be3cbf0a9.
* gh-91870: Remove unsupported SRE opcode CALL (GH-91872)Serhiy Storchaka2022-04-261-6/+0
| | | | | | | It was initially added to support atomic groups, but that support was never fully implemented, and CALL was only left in the compiler, but not interpreter and parser. ATOMIC_GROUP is now used to support atomic groups.
* gh-91575: Add a script for generating data for case-insensitive matching in ↵Serhiy Storchaka2022-04-221-57/+2
| | | | | re (GH-91660) Also test that all extra cases are in BMP.
* gh-91575: Update case-insensitive matching in re to the latest Unicode ↵Serhiy Storchaka2022-04-181-3/+27
| | | | version (GH-91580)
* bpo-47211: Remove function re.template() and flag re.TEMPLATE (GH-32300)Serhiy Storchaka2022-04-061-2/+0
| | | They were undocumented and never working.
* bpo-23689: re module, fix memory leak when a match is terminated by a signal ↵Ma Lin2022-04-031-22/+39
| | | | or memory allocation failure (GH-32283)
* bpo-47152: Convert the re module into a package (GH-32177)Serhiy Storchaka2022-04-021-0/+800
The sre_* modules are now deprecated.