-
Notifications
You must be signed in to change notification settings - Fork 117
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
Python 3.7 pylint 2.0.0.dev2 AttributeError: module 'astroid.nodes' has no attribute 'CallFunc' #173
Comments
@carlio I think astroid has changed some of the node names. I've seen some of the different node names at a pylint workshop I held recently. How do we want to handle this? Try to be backwards and forwards compatible or just require newer astroid/pylint as dependencies ? |
I'm struggling to install |
astroid 2.0 is Python 3 only, so I think we should be compatible with previous versions until support for Django 1.11 is dropped. If we can get a Pylint 2.x build running in CI (with failures ignored for now), I can tackle some of these issues, but I don’t know enough tox to do it. Update: pylint-plugin-utils has dropped support for Python 2, so we don't have much of a choice here. |
Any updates on this ? |
I've been trying to get Travis to execute tests with Python 3.7 and the latest pylint/astroid but without luck. @federicobond my code is in py37-pylint-dev branch if you want to take a look. |
@atodorov I think that keeping compat/backwards support layers is probably not worth it any more unless it's easy. There are lots of changes to django, astroid, pylint and python so it really becomes hard to keep everything going. Certainly when I tried that with this and other libs it made the code worse ans therefore the library I was writing worse, and added lots of additional vectors for bugs... Simple things is fine, see this for example https://github.com/PyCQA/pylint-plugin-utils/blob/master/pylint_plugin_utils/__init__.py#L2 so I think a mild 'compat.py' isn't a huge problem for just renaming nodes etc, but I wouldn't put too much emphasis on keeping old versions of libs working with new versions of pylint-django. If you're using old pylint/old django then use old pylint-django! |
pylint 2.0 and android 2.0 just got released which might affect this. |
@carlio I'm still not quite sure how to reproduce locally. Everything was working fine for me with pylint/astroid 2.0 but an older pylint-plugin-utils. With pylint-plugin-utils 0.3 and pylint/astroid 2.0 I see the traceback from comment #0. I also see you've merged a PR that seems related. Maybe we need a new version of pylint-plugin-utils and to bump the minimum required version in setup.py ? |
@atodorov I can bump the pylint-plugin-utils release, also I can add you to that team/group if you like (as far as I know only pylint-django uses it a lot, pylint-celery isn't used much). |
@atodorov pylint-plugin-utils 0.4 just released. I didn't pin the pylint version in that lib, that's something that should be chosen in the pylint-django (or other plugin) libs I feel. |
also drop testing with Python 2.7 b/c pylint 2.0 is compatible only with Python 3
Still getting the same error with pipenv, python 3.7.0. Pip freeze output:
|
@ochronus AIUI, it's fixed in master, but not released yet. So we need some patience. ;-) |
or a pull request to fix the remaining test failures :) |
Oh, my bad, since it was closed I thought it's out in the wild :) thx for the heads up! |
Can I ask what the status is currently on this? I've just started getting this issue myself. |
Can't wait for this to be fixed, Thanks a lot 👍 |
Do not wait, do :) |
I'm not that advanced, but sure, i'll try that out |
✅🔨 Fix linting errors in tests Upgrade: * faker from 0.8.15 to 0.8.17 * sphinx-rtd-theme from 0.3.1 to 0.4.0 * sphinx from 1.7.4 to 1.7.6 * django-extensions from 2.0.7 to 2.1.0 * astroid from 1.6.4 to 1.6.5 * pylint from 1.9.1 to 1.9.2 * setuptools from 39.2.0 to 40.0.0 * tox from 3.0.0 to 3.1.2 Further upgrades to PyLint, Astroid, and pylint-django ignored: - pylint-dev/pylint-django#173 - pylint-dev/pylint-django#165
Just read through this thread but I'm still lost. What do I need to do to fix this error? |
Workaround before new version is released:
|
@atodorov this fixed this problem in another lib I had - prospector-dev/requirements-detector@5c97a18 Not sure if that's how you'd like to fix it here but seems simple enough so might be worth thinking about. |
@dspacejs temporarily, |
- Parallel execution initially introduced. - Tests added. Tests are split into different files. Cosmetics: - Plugin `pylint-django` disabled until new release is here (current version is 0.11.1) because of the bug: pylint-dev/pylint-django#173. - Dependencies updated. - README.md updated.
@carlio we've already taken care of the node name changes introduced by astroid 2.0. Currently a few test cases are failing. From what I can tell the inference works differently and whenever we try to compare against expected class names (e.g. subclasses of Factory) that fails. Why and how I still can't figure out. |
Installing an older version of
|
The latest released version of pylint-django (2.0, it's only a few hours old) works for me on python 3.7. |
Oh thanks, just tried it and it does for me too. Didn't realise it was released |
I'm trying to use pylint for Python 3.7, which isn't supported until pylint 2.0.0, so it is still in dev. However, I thought I would bring this here as pylint 2.0.0 fails when loading pylint_django, simply when checking the version (no file to be linted).
Fails when loading the plugin pylint_django:
Freeze:
The text was updated successfully, but these errors were encountered: