-
Notifications
You must be signed in to change notification settings - Fork 121
Migrate to pylint 2.0 #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pylint_django/__init__.py
Outdated
| 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. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: DeprecationWarning
|
Looks like we are in business now. I see some failures which look like the linter was not ignoring scenarios it should have ignored. |
|
@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 |
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)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: nodes.Attribute
|
@atodorov I have a couple more fixes that build on top of this. How should we go about doing it? |
these have been deprecated in astroid 1.4.0 and removed in 2.0
|
@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. |
|
I have 5 too, my fixes matched your latest two commits. |
|
Merged so we can allow others to work on this if they like. I will continue investigating the failing tests in the upcoming days. |
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 ?