Hide Forgot
Description of problem: A bug was identified by the python developers that meant python incorrectly parsed certain regular expressions (http://bugs.python.org/issue18647). This incorrect behaviour is present in the version of Python shipped with RHEL7, and may trip up unsuspecting users. Not sure if, under the circumstances, you see value in backporting this fix. Fixed by this commit https://github.com/python/cpython/commit/d30106dddd09af83ca5f0c49ac5a499f891dbdbe If I'm reading the git history correctly, it looks like it was fixed ahead of the 2.7.6rc1 release. Version-Release number of selected component (if applicable): How reproducible: Easy Steps to Reproduce: $ cat ~/bug.py import re re.compile("(?P<thing>\w*)?") print "All OK!" $ python ~/bug.py Traceback (most recent call last): File "/home/opc/bug.py", line 3, in <module> re.compile("(?P<thing>\w*)?") File "/usr/lib64/python2.7/re.py", line 190, in compile return _compile(pattern, flags) File "/usr/lib64/python2.7/re.py", line 242, in _compile raise error, v # invalid expression sre_constants.error: nothing to repeat Expected results: Should return "All OK!" Additional info:
(In reply to paulgraydon from comment #0) > Description of problem: > > A bug was identified by the python developers that meant python incorrectly > parsed certain regular expressions (http://bugs.python.org/issue18647). > This incorrect behaviour is present in the version of Python shipped with > RHEL7, and may trip up unsuspecting users. Not sure if, under the > circumstances, you see value in backporting this fix. Hello and thank you for the bug report. The issue will be evaluated for a fix, however it's not high on the priority list at the moment.
Reproduced on python-2.7.5-48.el7: :: [ BEGIN ] :: Run reproducer :: actually running 'python test.py' Traceback (most recent call last): File "test.py", line 3, in <module> re.compile("(?P<thing>\w*)?") File "/usr/lib64/python2.7/re.py", line 190, in compile return _compile(pattern, flags) File "/usr/lib64/python2.7/re.py", line 242, in _compile raise error, v # invalid expression sre_constants.error: nothing to repeat :: [ FAIL ] :: Run reproducer (Expected 0, got 1) Verified on python-2.7.5-57.el7: Regular expression is correctly parsed :: [ BEGIN ] :: Run reproducer :: actually running 'python test.py' :: [ PASS ] :: Run reproducer (Expected 0, got 0)
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:1868
Heads up (will get proper BZ with reproducer filed later) this might have broken one of OpenStack deps: https://bugs.launchpad.net/tripleo/+bug/1717545