Skip to content

Conversation

@atodorov
Copy link
Contributor

Initial work to support pylint 2.0. However many tests started failing.

Tips are welcome, I will look at the tests in the next couple of days.

@carlio what do you think about requiring pylint >= 2.0 from now on and not dealing with backwards compatibility for newer versions ?

@coveralls
Copy link

Pull Request Test Coverage Report for Build 425

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at ?%

Totals Coverage Status
Change from base Build 414: 0.0%
Covered Lines:
Relevant Lines: 0

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jul 15, 2018

Pull Request Test Coverage Report for Build 432

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at ?%

Totals Coverage Status
Change from base Build 414: 0.0%
Covered Lines:
Relevant Lines: 0

💛 - Coveralls

if sys.version_info < (3, ):
warnings.warn("Version 0.8.0 is the last to support Python 2. "
"Please migrate to Python 3!", DeprecationWarning)
raise DepracationWarning("Version 0.11.1 was the last to support Python 2. "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: DeprecationWarning

@atodorov
Copy link
Contributor Author

Looks like we are in business now. I see some failures which look like the linter was not ignoring scenarios it should have ignored.

@carlio
Copy link
Member

carlio commented Jul 16, 2018

@atodorov I think that an aggressive requirements update is a good plan because that is how Django and pylint and astroid are doing things; pypi still has old pylint-django, so I'd agree, make it pylint>=2.0 and perhaps just an extra line or two in the README to mention that change.

If people don't pin even test dependencies they can't reasonably expect their builds to work all the time, and I prefer making it their problem rather than ours by adding too much backwards compatabilty overhead. As I said elsewhere - if it's easy, why not, but let's not try too hard.

There is a PR for bumping pylint-plugin-utils to 0.4 which will include pylint2 compatability - that's here: #180

atodorov added 2 commits July 16, 2018 16:16
also drop testing with Python 2.7 b/c pylint 2.0 is compatible
only with Python 3
# typically the class of the foreign key will
# be the first argument, so we'll go from left to right
if isinstance(arg, (nodes.Name, nodes.Getattr)):
if isinstance(arg, (nodes.Name, nodes.Attributes)):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: nodes.Attribute

@federicobond
Copy link
Contributor

@atodorov I have a couple more fixes that build on top of this. How should we go about doing it? master is red anyway, so I don't see much trouble merging this to keep momentum going.

atodorov added 2 commits July 17, 2018 23:54
these have been deprecated in astroid 1.4.0 and removed in 2.0
@atodorov
Copy link
Contributor Author

@federicobond can you at least share a branch that we can take a look at?

I've managed to narrow things down to only 5 failing tests and I don't mind merging to master to allow you or others to send in pull requests.

@federicobond
Copy link
Contributor

I have 5 too, my fixes matched your latest two commits.

@atodorov atodorov merged commit 3884b9e into master Jul 18, 2018
@atodorov atodorov deleted the pylint20 branch July 18, 2018 06:01
@atodorov
Copy link
Contributor Author

Merged so we can allow others to work on this if they like. I will continue investigating the failing tests in the upcoming days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants