kmmbvnr / django-jenkins

Plug and play continuous integration with django and jenkins
GNU Lesser General Public License v3.0
945 stars 279 forks source link

Pylint 1.0.0 raises an exception #187

Closed ekohl closed 11 years ago

ekohl commented 11 years ago

Every time I run, I get the following error (I think it's a warning and then an error):

myproject/virtualenv/lib/python2.6/site-packages/pylint/reporters/text.py:79: UserWarning: parseable output format is deprecated. This is equivalent to --msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
  % (self.name, self.line_format))
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "myproject/virtualenv/lib/python2.6/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "myproject/virtualenv/lib/python2.6/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "myproject/virtualenv/lib/python2.6/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "myproject/virtualenv/lib/python2.6/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "myproject/virtualenv/lib/python2.6/site-packages/django_jenkins/management/commands/__init__.py", line 93, in handle
    if test_runner.run_tests(test_labels):
  File "myproject/virtualenv/lib/python2.6/site-packages/django/test/simple.py", line 384, in run_tests
    self.teardown_test_environment()
  File "myproject/virtualenv/lib/python2.6/site-packages/django_jenkins/runner.py", line 268, in teardown_test_environment
    signals.teardown_test_environment.send(sender=self)
  File "myproject/virtualenv/lib/python2.6/site-packages/django/dispatch/dispatcher.py", line 172, in send
    response = receiver(signal=self, sender=sender, **named)
  File "myproject/virtualenv/lib/python2.6/site-packages/django_jenkins/tasks/run_pylint.py", line 45, in teardown_test_environment
    exit=False)
  File "myproject/virtualenv/lib/python2.6/site-packages/pylint/lint.py", line 1010, in __init__
    linter.check(args)
  File "myproject/virtualenv/lib/python2.6/site-packages/pylint/lint.py", line 599, in check
    self.check_astroid_module(astroid, walker, rawcheckers, tokencheckers)
  File "myproject/virtualenv/lib/python2.6/site-packages/pylint/lint.py", line 685, in check_astroid_module
    walker.walk(astroid)
  File "myproject/virtualenv/lib/python2.6/site-packages/pylint/utils.py", line 662, in walk
    self.walk(child)
  File "myproject/virtualenv/lib/python2.6/site-packages/pylint/utils.py", line 662, in walk
    self.walk(child)
  File "myproject/virtualenv/lib/python2.6/site-packages/pylint/utils.py", line 662, in walk
    self.walk(child)
  File "myproject/virtualenv/lib/python2.6/site-packages/pylint/utils.py", line 662, in walk
    self.walk(child)
  File "myproject/virtualenv/lib/python2.6/site-packages/pylint/utils.py", line 662, in walk
    self.walk(child)
  File "myproject/virtualenv/lib/python2.6/site-packages/pylint/utils.py", line 662, in walk
    self.walk(child)
  File "myproject/virtualenv/lib/python2.6/site-packages/pylint/utils.py", line 662, in walk
    self.walk(child)
  File "myproject/virtualenv/lib/python2.6/site-packages/pylint/utils.py", line 662, in walk
    self.walk(child)
  File "myproject/virtualenv/lib/python2.6/site-packages/pylint/utils.py", line 659, in walk
    cb(astroid)
  File "myproject/virtualenv/lib/python2.6/site-packages/pylint/checkers/typecheck.py", line 174, in visit_getattr
    if is_super(owner) or getattr(owner, 'type', None) == 'metaclass':
  File "myproject/virtualenv/lib/python2.6/site-packages/astroid/bases.py", line 51, in __getattr__
    return getattr(self._proxied, name)
  File "myproject/virtualenv/lib/python2.6/site-packages/astroid/scoped_nodes.py", line 680, in _class_type
    for base in klass.ancestors(recurs=False):
  File "myproject/virtualenv/lib/python2.6/site-packages/astroid/scoped_nodes.py", line 801, in ancestors
    for baseobj in stmt.infer(context):
TypeError: unbound method infer() must be called with Tuple instance as first argument (got InferenceContext instance instead)

Since it exits with code 1, all my builds start to fail.

Tried on django-jenkins 0.13.0 and 0.14.1.

kmmbvnr commented 11 years ago

not a django-jenkins issue

ekohl commented 11 years ago

I investigated a bit further and discovered that running pylint from the command line was also broken. Somehow it wasn't processing the logilab-common>=0.60.0 dependency. After I upgrade that, I can reproduce the pylint error on the command line.

However, I do think this is a django-jenkins issue since 0.14.1 requires pylint 1.0.0 so the pylint runner is broken in the latest version. Also, the warning is triggered because django-jenkins uses a deprecated pylint reporter.

obedmr commented 11 years ago

does this issue solved in some way? I tried the django-jenkins on a fresh django installation and I got the same issue.

kmmbvnr commented 11 years ago

http://bit.ly/1bjsCf7

obedmr commented 11 years ago

That was funny. https://bitbucket.org/logilab/astroid/commits/5ed6266cab789bc89d882444c938f03953491496