Align RegexRpl API with the re/regex one#387
Merged
Merged
Conversation
priv-kweihmann
requested changes
Jun 17, 2026
priv-kweihmann
left a comment
Owner
There was a problem hiding this comment.
Good catch, but even if flag didn't do anything apparently, I would like to keep the MULTILINE flag in this case,
even if it's just for highlighting the expectations (of handling multiline input) in comparison to others that don't use the flag
Owner
|
In addition this PR is missing an updated API doc - please regenerate that one according to the docs provided by the readme |
4d5c51b to
1a72fae
Compare
Due to API mismatch one could provide regex flags that would be treated as the timeout value instead. To prevent that and other mistakes let's align the API with normal re/regex modules. Signed-off-by: Michal Sieron <michalwsieron@gmail.com>
1a72fae to
508197f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While analyzing some parsing issues I noticed the
regex.MULTILINEflag inparser.pydoesn't really change anything, as it is treated as a value for positionaltimeoutargument. As things did work with flag not being applied let's drop it.While at it I aligned the API to match upstream re/regex modules.