Skip to content
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

pylint-django 2.4.3 Fails with pylint 2.8.0 #322

Closed
VOIDMalkuth opened this issue Apr 25, 2021 · 1 comment
Closed

pylint-django 2.4.3 Fails with pylint 2.8.0 #322

VOIDMalkuth opened this issue Apr 25, 2021 · 1 comment

Comments

@VOIDMalkuth
Copy link

Description

pylint --load-plugins pylint_django core failed with following exception

Traceback (most recent call last):
  File "c:\users\<username>\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\<username>\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\<projectpath>\venv\Scripts\pylint.exe\__main__.py", line 7, in <module>
  File "C:\<projectpath>\venv\lib\site-packages\pylint\__init__.py", line 24, in run_pylint
    PylintRun(sys.argv[1:])
  File "C:\<projectpath>\venv\lib\site-packages\pylint\lint\run.py", line 279, in __init__
    linter.load_plugin_modules(self._plugins)
  File "C:\<projectpath>\venv\lib\site-packages\pylint\lint\pylinter.py", line 503, in load_plugin_modules
    module = astroid.modutils.load_module_from_name(modname)
  File "C:\<projectpath>\venv\lib\site-packages\astroid\modutils.py", line 212, in load_module_from_name
    return importlib.import_module(dotted_name)
  File "c:\users\<username>\appdata\local\programs\python\python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "C:\<projectpath>\venv\lib\site-packages\pylint_django\__init__.py", line 6, in <module>
    from pylint_django import plugin
  File "C:\<projectpath>\venv\lib\site-packages\pylint_django\plugin.py", line 5, in <module>
    from pylint_django.checkers import register_checkers
  File "C:\<projectpath>\venv\lib\site-packages\pylint_django\checkers\__init__.py", line 3, in <module>
    from pylint_django.checkers.models import ModelChecker
  File "C:\<projectpath>\venv\lib\site-packages\pylint_django\checkers\models.py", line 11, in <module>
    from pylint_django.utils import node_is_subclass, PY3
  File "C:\<projectpath>\venv\lib\site-packages\pylint_django\utils.py", line 9, in <module>
    from pylint_django.compat import Uninferable
  File "C:\<projectpath>\venv\lib\site-packages\pylint_django\compat.py", line 28, in <module>
    LOAD_CONFIGURATION_SUPPORTED = pylint.__pkginfo__.numversion >= (2, 3)
AttributeError: module 'pylint.__pkginfo__' has no attribute 'numversion'

The same command worked fine before I updated pylint from 2.7.4 and astroid from 2.5.3

Environment

asgiref==3.3.4
astroid==2.5.5
colorama==0.4.4
coverage==5.5
Django==3.2
djangorestframework==3.12.4
isort==5.8.0
lazy-object-proxy==1.6.0
mccabe==0.6.1
pylint==2.8.0
pylint-django==2.4.3
pylint-plugin-utils==0.6
pytz==2021.1
sqlparse==0.4.1
toml==0.10.2
wrapt==1.12.1
@atodorov
Copy link
Contributor

Fix in #321.

atodorov added a commit that referenced this issue Apr 26, 2021
not only variable names have changed, but also tuple values are now
string instead of integers.
atodorov added a commit that referenced this issue Apr 26, 2021
not only variable names have changed, but also tuple values are now
string instead of integers.
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

No branches or pull requests

2 participants