bpo-34294: re module, fix wrong capturing groups in rare cases · Pull Request #11546 · python/cpython

@ghost ghost changed the title bpo-34294: in re module, reset state when must_advance bpo-34294: in re module, fix wrong capturing groups when advancing inside a match

Jan 14, 2019

@ghost ghost changed the title bpo-34294: in re module, fix wrong capturing groups when advancing inside a match bpo-34294: in re module, fix wrong capturing groups when advancing inside a search

Jan 15, 2019

ZackerySpytz

@ghost ghost changed the title bpo-34294: in re module, fix wrong capturing groups when advancing inside a search bpo-34294: in re module, fix wrong capturing groups when must_advance attempt fails.

Jan 18, 2019

@ghost ghost changed the title bpo-34294: in re module, fix wrong capturing groups when must_advance attempt fails. bpo-34294: in re module, fix wrong capturing groups in SRE(search) function.

Jan 21, 2019

@wjssz

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

@ghost ghost changed the title bpo-34294: in re module, fix wrong capturing groups in SRE(search) function. bpo-34294: re module, fix wrong capturing groups in rare cases

Jan 23, 2019

@wjssz

@wjssz

serhiy-storchaka

@wjssz

serhiy-storchaka

@wjssz

serhiy-storchaka

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Feb 18, 2019
…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>

miss-islington added a commit that referenced this pull request

Feb 18, 2019
…1546)

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>

@ghost ghost mentioned this pull request

Feb 18, 2019

@ghost ghost deleted the fix_re branch

February 18, 2019 14:39