Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
a16453e
to
69410e5
Compare
b989d2e
to
6dfdfc5
Compare
Need to reset capturing groups between two `SRE(match)` callings in loops, this fixes wrong capturing groups in rare cases. Other changes in this commit: * Emit `SRE_ERROR_STATE` when reach impossible code path, rather than return a match failure silently. * Add two test-cases to `test_zerowidth()`. * Add a missing index in `re.rst`. * Remove an outdated FIXME comment in `_sre.c`.
|
LGTM. Just rewrite a news entry. |
|
Thanks @animalize for the PR, and @serhiy-storchaka for merging it |
…onGH-11546) Need to reset capturing groups between two SRE(match) callings in loops, this fixes wrong capturing groups in rare cases. Also add a missing index in re.rst. (cherry picked from commit 4a7f44a) Co-authored-by: animalize <animalize@users.noreply.github.com>
|
GH-11919 is a backport of this pull request to the 3.7 branch. |
SRE(match)doesn't reset capturing groups, we need to reset them between twoSRE(match)callings in loops. Otherwise the previousSRE(match)'s capturing groups may intrude upon the currentSRE(match).re.rsthttps://bugs.python.org/issue34294