Issue 28070: 3.6 regression: re.compile not handling flags with X correctly (original) (raw)

Issue28070

Created on 2016-09-10 22:07 by yan12125, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg275705 - (view) Author: (yan12125) * Date: 2016-09-10 22:07
This test script: import re print(re.compile(r'(?ix)A').flags == re.I | re.X re.U) print(re.compile(r'(?ix)A').flags == re.X re.U) print(re.compile(r'(?im)A').flags == re.I re.M re.U) gives False, True, True on default:b28b37de9470+. Python 3.5.2 gives True, False, True. Seems re.compile does not handle flags with X correctly?
msg275706 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2016-09-10 22:17
I get normal behaviour on e3dbe8b7279a
msg275708 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-10 22:43
New changeset bee52e5f8fb1 by Serhiy Storchaka in branch 'default': Issue #28070: Fixed parsing inline verbose flag in regular expressions. https://hg.python.org/cpython/rev/bee52e5f8fb1 New changeset 842e75f0e592 by Serhiy Storchaka in branch '3.5': Backported tests for issue #28070. https://hg.python.org/cpython/rev/842e75f0e592 New changeset afc0d4478083 by Serhiy Storchaka in branch '2.7': Backported tests for issue #28070. https://hg.python.org/cpython/rev/afc0d4478083
msg275709 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-09-10 22:44
Thank you for your report Chi Hsuan Yen!
msg275738 - (view) Author: (yan12125) * Date: 2016-09-11 07:41
Thanks for such a quick fix!
History
Date User Action Args
2022-04-11 14:58:36 admin set github: 72257
2016-09-11 07:41:51 yan12125 set messages: +
2016-09-10 22:44:20 serhiy.storchaka set status: open -> closedresolution: fixedmessages: + stage: resolved
2016-09-10 22:43:36 python-dev set nosy: + python-devmessages: +
2016-09-10 22:17:05 SilentGhost set nosy: + SilentGhostmessages: +
2016-09-10 22:07:45 yan12125 create