| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
| |
(#107778)
Deprecate passing optional arguments maxsplit, count and flags in
module-level functions re.split(), re.sub() and re.subn() as positional.
They should only be passed by keyword.
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
| |
It did not work in the case of a subpattern containing backtracking.
Temporary implement possessive quantifiers as equivalent greedy qualifiers
in atomic groups.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Functions re.sub() and re.subn() and corresponding re.Pattern methods
are now 2-3 times faster for replacement strings containing group references.
Closes #91524
Primarily authored by serhiy-storchaka Serhiy Storchaka
Minor-cleanups-by: Gregory P. Smith [Google] <greg@krypto.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Revert "bpo-47211: Remove function re.template() and flag re.TEMPLATE (GH-32300)"
This reverts commit b09184bf05b07b77c5ecfedd4daa846be3cbf0a9.
|
|
|
|
|
|
|
|
| |
in RE (GH-91792)
Only sequence of ASCII digits is now accepted as a numerical reference.
The group name in bytes patterns and replacement strings can now only
contain ASCII letters and digits and underscore.
|
|
|
|
|
|
|
|
| |
(GH-91794)
Only sequence of ASCII digits will be accepted as a numerical reference.
The group name in bytes patterns and replacement strings could only
contain ASCII letters and digits and underscore.
|
|
|
| |
Previously, pickling did not fail, but the result could not be unpickled.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
1. It makes them interned.
2. It allows to add comments to individual opcodes.
|
| |
|
|
|
|
|
| |
re (GH-91660)
Also test that all extra cases are in BMP.
|
|
|
|
|
|
| |
In expression (?(group)...) an appropriate re.error is now
raised if the group number refers to not defined group.
Previously it raised RuntimeError: invalid SRE code.
|
|
|
| |
re.error is now raised instead of TypeError.
|
|
|
|
| |
version (GH-91580)
|
|
|
|
|
|
|
| |
* Move the code for generating Modules/_sre/sre_constants.h from
Lib/re/_constants.py into a separate script
Tools/scripts/generate_sre_constants.py.
* Add target `regen-sre` in the makefile.
* Make target `regen-all` depending on `regen-sre`.
|
| |
|
|
|
| |
They were undocumented and never working.
|
| |
|
| |
|
|
|
|
| |
or memory allocation failure (GH-32283)
|
|
The sre_* modules are now deprecated.
|