pylint-bot / astroid-unofficial

UNOFFICIAL playground for astroid github migration
GNU Lesser General Public License v2.1
0 stars 0 forks source link

'Call' object has no attribute 'starargs' (astroid-error) #187

Closed pylint-bot closed 8 years ago

pylint-bot commented 9 years ago

Originally reported by: Marcus Bajohr (BitBucket: antiphasis, GitHub: antiphasis)


Setting up a new development computer with python 3.5 i stumpled upon the following error:

Using this trivial working valid python code file, name it dummy.py:

#!python

print("test")

testing it with pylint dummy.py causes this traceback:

No config file found, using default configuration
Traceback (most recent call last):
  File "c:\python35\lib\site-packages\pylint\lint.py", line 910, in get_ast
    return MANAGER.ast_from_file(filepath, modname, source=True)
  File "c:\python35\lib\site-packages\astroid\manager.py", line 112, in ast_from_file
    return AstroidBuilder(self).file_build(filepath, modname)
  File "c:\python35\lib\site-packages\astroid\builder.py", line 134, in file_build
    module = self._data_build(data, modname, path)
  File "c:\python35\lib\site-packages\astroid\builder.py", line 177, in _data_build
    module = rebuilder.visit_module(node, modname, node_file, package)
  File "c:\python35\lib\site-packages\astroid\rebuilder.py", line 148, in visit_module
    newnode.body = [self.visit(child, newnode) for child in node.body]
  File "c:\python35\lib\site-packages\astroid\rebuilder.py", line 148, in <listcomp>
    newnode.body = [self.visit(child, newnode) for child in node.body]
  File "c:\python35\lib\site-packages\astroid\rebuilder.py", line 161, in visit
    return self._transform(visit_method(node, parent))
  File "c:\python35\lib\site-packages\astroid\rebuilder.py", line 427, in visit_discard
    newnode.value = self.visit(node.value, newnode)
  File "c:\python35\lib\site-packages\astroid\rebuilder.py", line 161, in visit
    return self._transform(visit_method(node, parent))
  File "c:\python35\lib\site-packages\astroid\rebuilder.py", line 331, in visit_callfunc
    if node.starargs is not None:
AttributeError: 'Call' object has no attribute 'starargs'
************* Module dummy
F:  1, 0: <class 'AttributeError'>: 'Call' object has no attribute 'starargs' (astroid-error)

pylint-bot commented 9 years ago

Original comment by Claudiu Popa (BitBucket: PCManticore, GitHub: PCManticore):


astroid and pylint don't support Python 3.5 yet, I'm still working on this and it will be due soon, in a couple of weeks. In the mean time, you can test with the repository versions, but be aware that they aren't very stable.

pylint-bot commented 9 years ago

Original comment by Marcus Bajohr (BitBucket: antiphasis, GitHub: antiphasis):


Ok, i'll give the repo versions a test.

Would't it be useful to show a more prominent warning that as of now astroid isn't working with python 3.5? Because that's how i was trapped. No warning while installation via pip, no warning or information on the site - the only trace is issue #117

pylint-bot commented 9 years ago

Original comment by Robert Bruce (BitBucket: robru, GitHub: robru):


+1 for this, just got bit by this myself.

Ubuntu Xenial (16.04) will be shipping python 3.5 as the default python interpreter, so it would be great to get this fixed & packaged in Ubuntu at some point before April 2016.

pylint-bot commented 8 years ago

Original comment by Claudiu Popa (BitBucket: PCManticore, GitHub: PCManticore):


We're working on releasing 1.4.0 with support for Python 3.5. The branch is here https://bitbucket.org/logilab/astroid/commits/branch/1.4.0, we're grafting non-controversial changes from the default branch until we're reaching a point where the branch is good to go for a release. It would be definitely sooner than April 2016, my expectation is that by the next week, we'll have it released.

pylint-bot commented 8 years ago

Original comment by BitBucket: sandrotosi, GitHub: sandrotosi:


@PCManticore any update on this?

pylint-bot commented 8 years ago

Original comment by Claudiu Popa (BitBucket: PCManticore, GitHub: PCManticore):


Just released astroid 1.4.0 along with pylint 1.5.0.