Bug 1586009

Summary: python-asttokens FTBFS with astroid 2.0.0
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-asttokensAssignee: Zbigniew Jędrzejewski-Szmek <zbyszek>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-asttokens-1.1.10-1.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-05 12:54:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1565020    
Attachments:
Description Flags
build.log from copr (Python 3.7.0b5)
none
root.log from copr (Python 3.7.0b5)
none
build.log from Koji (Python 3.6.x)
none
root.log from Koji (Python 3.6.x) none

Description Miro Hrončok 2018-06-05 10:04:35 UTC
Created attachment 1447789 [details]
build.log from copr (Python 3.7.0b5)

Description of problem: python-asttokens FTBFS with astroid 2.0.0 because test failures. This blocks the transition to Python 3.7 and happens on both 3.6 and 3.7. It has more failures on 3.6 than on 3.7. Logs attached.


Version-Release number of selected component (if applicable): 1.1.6-2.fc29

From 3.7:

======================================================================
ERROR: test_deep_recursion (tests.test_astroid.TestAstroid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/asttokens-1.1.6/tests/test_mark_tokens.py", line 160, in test_deep_recursion
    m = self.create_mark_checker(source)
  File "/builddir/build/BUILD/asttokens-1.1.6/tests/test_astroid.py", line 14, in create_mark_checker
    tree = builder.string_build(source)
  File "/usr/lib/python3.7/site-packages/astroid/builder.py", line 154, in string_build
    module = self._data_build(data, modname, path)
  File "/usr/lib/python3.7/site-packages/astroid/builder.py", line 195, in _data_build
    module = builder.visit_module(node, modname, node_file, package)
  File "/usr/lib/python3.7/site-packages/astroid/rebuilder.py", line 152, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File "/usr/lib/python3.7/site-packages/astroid/rebuilder.py", line 152, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File "/usr/lib/python3.7/site-packages/astroid/rebuilder.py", line 164, in visit
    return visit_method(node, parent)
  File "/usr/lib/python3.7/site-packages/astroid/rebuilder.py", line 268, in visit_assign
    value=self.visit(node.value, newnode),
  File "/usr/lib/python3.7/site-packages/astroid/rebuilder.py", line 164, in visit
    return visit_method(node, parent)
    ...snip...
  File "/usr/lib/python3.7/site-packages/astroid/rebuilder.py", line 297, in visit_binop
    node.lineno, node.col_offset, parent)
RecursionError: maximum recursion depth exceeded
ors:
======================================================================
FAIL: test_adjacent_strings (tests.test_astroid.TestAstroid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/asttokens-1.1.6/tests/test_mark_tokens.py", line 225, in test_adjacent_strings
    node_name + ":'x y z'   # comment2\n       'a b c'   # comment3\n       'u v w'"
AssertionError: Items in the first set but not the second:
"Const:'x y z'"
Items in the second set but not the first:
"Const:'x y z'   # comment2\n       'a b c'   # comment3\n       'u v w'"
======================================================================
FAIL: test_token_methods (tests.test_asttokens.TestASTTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/asttokens-1.1.6/tests/test_asttokens.py", line 45, in test_token_methods
    self.assertEqual(atok.prev_token(atok.tokens[5]), atok.tokens[3])
AssertionError: Token(type=56, string='\n', start=(2, 0), end=(2, 1)[40 chars]s=22) != Token(type=4, string='\n', start=(1, 20), end=(1, 21[61 chars]s=21)
======================================================================
FAIL: test_adjacent_strings (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/asttokens-1.1.6/tests/test_mark_tokens.py", line 225, in test_adjacent_strings
    node_name + ":'x y z'   # comment2\n       'a b c'   # comment3\n       'u v w'"
AssertionError: Items in the first set but not the second:
"Str:'x y z'"
Items in the second set but not the first:
"Str:'x y z'   # comment2\n       'a b c'   # comment3\n       'u v w'"
----------------------------------------------------------------------
Ran 72 tests in 2.245s
FAILED (errors=1, failures=3)

Comment 1 Miro Hrončok 2018-06-05 10:05:04 UTC
Created attachment 1447790 [details]
root.log from copr (Python 3.7.0b5)

Comment 2 Miro Hrončok 2018-06-05 10:05:48 UTC
Created attachment 1447791 [details]
build.log from Koji (Python 3.6.x)

Comment 3 Miro Hrončok 2018-06-05 10:06:06 UTC
Created attachment 1447793 [details]
root.log from Koji (Python 3.6.x)