test failure test_strutils.SplitByCommas.test_with_backslash_inside_quoted with pyparsing 2.0.1

Bug #1635533 reported by Dirk Mueller on 2016-10-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.utils
Undecided
Unassigned

Bug Description

With pyparsing 2.0.1 this test failure occurs:

[ 29s] FAIL: oslo_utils.tests.test_strutils.SplitByCommas.test_with_backslash_inside_quoted [ 29s] tags: worker-0
[ 29s] ----------------------------------------------------------------------
[ 29s] Empty attachments:
[ 29s] stderr
[ 29s] stdout
[ 29s]
[ 29s] Traceback (most recent call last):
[ 29s] File "oslo_utils/tests/test_strutils.py", line 800, in test_with_backslash_inside_quoted
[ 29s] r'"abc\"","de","fg,h","klm\\","\"nop"')
[ 29s] File "oslo_utils/tests/test_strutils.py", line 793, in check
[ 29s] self.assertEqual(expect, strutils.split_by_commas(input))
[ 29s] File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual
[ 29s] self.assertThat(observed, matcher, message)
[ 29s] File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
[ 29s] raise mismatch_error
[ 29s] testtools.matchers._impl.MismatchError: !=:
[ 29s] reference = ['abc"', 'de', 'fg,h', 'klm\\', '"nop']
[ 29s] actual = ['abc"', 'de', 'fg,h', 'klm\\\\', '"nop']
[ 29s] Ran 8471 tests in 4.980s

pyparsing 2.0.3 changelog includes this information:

- update to version 2.0.3:
  * Fixed escaping behavior in QuotedString. Formerly, only
    quotation marks (or characters designated as quotation marks in
    the QuotedString constructor) would be escaped. Now all escaped
    characters will be escaped, and the escaping backslashes will
    be removed.

it looks like testing against 2.0.7 (latest release before 2.1) works just fine, further confirming this relationship. suggest to bump the minimum requirement.

ChangBo Guo(gcb) (glongwave) wrote :

we have update to pyparsing===2.2.0 in https://github.com/openstack/requirements/blob/master/upper-constraints.txt#L377 and there is no test failure now.

Changed in oslo.utils:
status: New → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for oslo.utils because there has been no activity for 60 days.]

Changed in oslo.utils:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers