pylint-bot / test

0 stars 0 forks source link

1.4.0 and 1.4.1 fail to work with pylint 1.4.4 #275

Closed pylint-bot closed 8 years ago

pylint-bot commented 8 years ago

Originally reported by: Paul Michali (BitBucket: paul_michali)


In openstack.org's neutron project, using pylint 1.4.4, when astroid updated to 1.4.1 pylint failed with many non-sensical errors. For example, use of any module from an import was showing a undefined variable error in pylint, which worked fine with astroid 1.3.8 and pylint 1.4.4. We see the same issue with astroid 1.4.0 as well.

E.g.

import abc import six ... @six.add_metaclass(abc.ABCMeta)

Plyint would report undefined variable for 'abc' and 'six'. This happens for every import in every file.


pylint-bot commented 8 years ago

Original comment by BitBucket: afahim, GitHub: @afahim?:


I can confirm the above. Had to pin astroid version to 1.3.8 to get pylint 1.4.4 to keep working. Works for now, would be nice if the issue gets resolved however.

Here is a stacktrace.

#!python

Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.7.9/bin/pylint", line 11, in <module>
    sys.exit(run_pylint())
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/pylint/__init__.py", line 20, in run_pylint
    from pylint.lint import Run
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/pylint/lint.py", line 30, in <module>
    from pylint.checkers import utils
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/pylint/checkers/__init__.py", line 46, in <module>
    from astroid.utils import ASTWalker
ImportError: No module named utils
pylint-bot commented 8 years ago

Original comment by Florian Bruhin (BitBucket: The-Compiler, GitHub: @The-Compiler?):


I'm pretty sure mixing a new astroid version with an old pylint version is an unsupported thing and expected to break.

pylint-bot commented 8 years ago

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


Yes, they are pretty much incompatible, so try to update pylint to 1.5.0. I know this would have been been better if they we're called 2.0.

pylint-bot commented 8 years ago

Original comment by Paul Michali (BitBucket: paul_michali):


Should there be some constraint that prevents pylint 1.4.4 from using astroid 1.4.x? Currently, several projects in OpenStack are using pylint 1.4.4, which is pulling in astroid 1.4.1 as a dependency and breaking.

pylint-bot commented 8 years ago

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


It probably should, but I don't know if it's possible to release 1.4.5 with a pinned dependency of astroid if there is a newer release on PyPi. This is a genuine question, I don't know if it works to upload an older bug fix release.

pylint-bot commented 8 years ago

Original comment by Florian Bruhin (BitBucket: The-Compiler, GitHub: @The-Compiler?):


I don't see why not - there are projects which have several maintained major versions after all, right?

pylint-bot commented 8 years ago

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


I'm going to give it a try then. Paul, would 1.4.5 with a pinned dependency of astroid help you at all?

pylint-bot commented 8 years ago

Original comment by Paul Michali (BitBucket: paul_michali):


Yes, I think it would, as currently, we are pinning pylint to 1.4.4, and it is pulling in astroid 1.4.1. We could pin pylint to 1.4.5 and it may ease the pain.

pylint-bot commented 8 years ago

Original comment by Robert Collins (BitBucket: rbtcollins, GitHub: @rbtcollins?):


Yes, appropriate deps within the 1.4.x series would make it a lot easier: rather than trying to coordinate changes to astroid across dozens of projects that all will move to pylint 1.5 at some future point, we can just specify pylint 1.4.5 as compatible with 1.4.4 and let astroid be managed by the pylint dependency.

astroid<1.4.0 would be the preferred way to spell it IMO, then if you do decide to do a point release of astroid you have space to do it in.

pylint-bot commented 8 years ago

Original comment by Robert Collins (BitBucket: rbtcollins, GitHub: @rbtcollins?):


Any word on pylint 1.4.5?

pylint-bot commented 8 years ago

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


Hey folks, sorry for the delay. pylint 1.4.5 hit PyPi, please test and tell me if something is not working as expected. Except the astroid change, everything is the same as in 1.4.4.

pylint-bot commented 8 years ago

Original comment by Paul Michali (BitBucket: paul_michali):


Thanks!