← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1603236] [NEW] py35: TestCheckForMutableDefaultArgs fails

 

Public bug reported:

The py35 gate fails on TestCheckForMutableDefaultArgs.


http://logs.openstack.org/52/337952/7/check/gate-keystone-python35-db-nv/2e9682b/testr_results.html.gz


ft125.1: keystone.tests.unit.test_hacking_checks.TestCheckForMutableDefaultArgs.test_StringException: Traceback (most recent call last):
  File "/home/jenkins/workspace/gate-keystone-python35-db-nv/keystone/tests/unit/test_hacking_checks.py", line 64, in test
    self.assert_has_errors(code, expected_errors=errors)
  File "/home/jenkins/workspace/gate-keystone-python35-db-nv/keystone/tests/unit/test_hacking_checks.py", line 53, in assert_has_errors
    self.assertItemsEqual(expected_errors or [], actual_errors)
  File "/home/jenkins/workspace/gate-keystone-python35-db-nv/.tox/py35/lib/python3.5/site-packages/unittest2/case.py", line 1182, in assertItemsEqual
    return self.assertSequenceEqual(expected, actual, msg=msg)
  File "/home/jenkins/workspace/gate-keystone-python35-db-nv/.tox/py35/lib/python3.5/site-packages/unittest2/case.py", line 1014, in assertSequenceEqual
    self.fail(msg)
  File "/home/jenkins/workspace/gate-keystone-python35-db-nv/.tox/py35/lib/python3.5/site-packages/unittest2/case.py", line 690, in fail
    raise self.failureException(msg)
AssertionError: Sequences differ: [(7, [201 chars] 'K001'), (28, 27, 'K001'), (29, 21, 'K001'), (32, 11, 'K001')] != [(7, [201 chars] 'K001'), (28, 26, 'K001'), (29, 21, 'K001'), (32, 10, 'K001')]

First differing element 12:
(28, 27, 'K001')
(28, 26, 'K001')
  [(7, 10, 'K001'),
   (10, 15, 'K001'),
   (10, 29, 'K001'),
   (13, 15, 'K001'),
   (16, 15, 'K001'),
   (16, 31, 'K001'),
   (22, 14, 'K001'),
   (22, 31, 'K001'),
   (22, 53, 'K001'),
   (25, 14, 'K001'),
   (25, 36, 'K001'),
   (28, 10, 'K001'),
-  (28, 27, 'K001'),
?        ^
+  (28, 26, 'K001'),
?        ^
   (29, 21, 'K001'),
-  (32, 11, 'K001')]
?        ^
+  (32, 10, 'K001')]
?        ^
 

The root cause is a difference the in the ast node col_offset value.
Python 3.4 and earlier were incorrect whereas 3.5 is fixed. It only
affected two of the function definitions in the code sample.

Here is a sample piece of code that illustrates the difference in the
ast module between Pythong 3.5 and earlier versions:

http://paste.openstack.org/show/532929/

** Affects: keystone
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1603236

Title:
  py35: TestCheckForMutableDefaultArgs fails

Status in OpenStack Identity (keystone):
  New

Bug description:
  The py35 gate fails on TestCheckForMutableDefaultArgs.

  
  http://logs.openstack.org/52/337952/7/check/gate-keystone-python35-db-nv/2e9682b/testr_results.html.gz

  
  ft125.1: keystone.tests.unit.test_hacking_checks.TestCheckForMutableDefaultArgs.test_StringException: Traceback (most recent call last):
    File "/home/jenkins/workspace/gate-keystone-python35-db-nv/keystone/tests/unit/test_hacking_checks.py", line 64, in test
      self.assert_has_errors(code, expected_errors=errors)
    File "/home/jenkins/workspace/gate-keystone-python35-db-nv/keystone/tests/unit/test_hacking_checks.py", line 53, in assert_has_errors
      self.assertItemsEqual(expected_errors or [], actual_errors)
    File "/home/jenkins/workspace/gate-keystone-python35-db-nv/.tox/py35/lib/python3.5/site-packages/unittest2/case.py", line 1182, in assertItemsEqual
      return self.assertSequenceEqual(expected, actual, msg=msg)
    File "/home/jenkins/workspace/gate-keystone-python35-db-nv/.tox/py35/lib/python3.5/site-packages/unittest2/case.py", line 1014, in assertSequenceEqual
      self.fail(msg)
    File "/home/jenkins/workspace/gate-keystone-python35-db-nv/.tox/py35/lib/python3.5/site-packages/unittest2/case.py", line 690, in fail
      raise self.failureException(msg)
  AssertionError: Sequences differ: [(7, [201 chars] 'K001'), (28, 27, 'K001'), (29, 21, 'K001'), (32, 11, 'K001')] != [(7, [201 chars] 'K001'), (28, 26, 'K001'), (29, 21, 'K001'), (32, 10, 'K001')]

  First differing element 12:
  (28, 27, 'K001')
  (28, 26, 'K001')
    [(7, 10, 'K001'),
     (10, 15, 'K001'),
     (10, 29, 'K001'),
     (13, 15, 'K001'),
     (16, 15, 'K001'),
     (16, 31, 'K001'),
     (22, 14, 'K001'),
     (22, 31, 'K001'),
     (22, 53, 'K001'),
     (25, 14, 'K001'),
     (25, 36, 'K001'),
     (28, 10, 'K001'),
  -  (28, 27, 'K001'),
  ?        ^
  +  (28, 26, 'K001'),
  ?        ^
     (29, 21, 'K001'),
  -  (32, 11, 'K001')]
  ?        ^
  +  (32, 10, 'K001')]
  ?        ^
   

  The root cause is a difference the in the ast node col_offset value.
  Python 3.4 and earlier were incorrect whereas 3.5 is fixed. It only
  affected two of the function definitions in the code sample.

  Here is a sample piece of code that illustrates the difference in the
  ast module between Pythong 3.5 and earlier versions:

  http://paste.openstack.org/show/532929/

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1603236/+subscriptions


Follow ups