-
Notifications
You must be signed in to change notification settings - Fork 118
Compatibility with pylint 3.0 #405
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
Comments
Ah, thank you I had not realised pylint 3 was coming out soon. This is going to cause some headaches! |
I agree, I think that I've been clinging on to having as broad a range as possible to be as useful as possible to most people. However several of the supported Django versions have been end of life even for security updates for more than a year. I think the sensible thing to do is to release a I can put a little graph of what versions of |
Let me know if I can help or do not hesitate to take over #400. I don't think there's going to be major incompatibilities with pylint 3.0.0 or anything truly painful to updates but it's hard to know for sure without running the CI first. |
I tried migrating to pylint 3.0.1 and I needed to make the following changes (based on https://pylint.pycqa.org/en/latest/whatsnew/3/3.0/index.html): Options is now a tuple:
Replace all @utils.check_messages to @utils.only_required_for_messages. replace After that I managed to get it running. |
Hello, Is there a known release date for this ? Thanks ! |
I am currently on holiday and travelling around so I will do my best to get to it but please be patient! |
No worries, thank you ! :) |
Closed via #407 ; pylint-django 2.5.4 is on PyPI |
@carlio With pylint pylint **/*.py
Traceback (most recent call last):
File "/workspaces/backend/.venv/bin/pylint", line 8, in <module>
sys.exit(run_pylint())
^^^^^^^^^^^^
File "/workspaces/backend/.venv/lib/python3.11/site-packages/pylint/__init__.py", line 34, in run_pylint
PylintRun(argv or sys.argv[1:])
File "/workspaces/backend/.venv/lib/python3.11/site-packages/pylint/lint/run.py", line 162, in __init__
args = _config_initialization(
^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/backend/.venv/lib/python3.11/site-packages/pylint/config/config_initialization.py", line 61, in _config_initialization
linter.load_plugin_modules(utils._splitstrip(config_data["load-plugins"]))
File "/workspaces/backend/.venv/lib/python3.11/site-packages/pylint/lint/pylinter.py", line 380, in load_plugin_modules
module = astroid.modutils.load_module_from_name(modname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/backend/.venv/lib/python3.11/site-packages/astroid/modutils.py", line 194, in load_module_from_name
module = importlib.import_module(dotted_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/workspaces/backend/.venv/lib/python3.11/site-packages/pylint_django/checkers/migrations.py", line 42, in <module>
class NewDbFieldWithDefaultChecker(checkers.BaseChecker):
File "/workspaces/backend/.venv/lib/python3.11/site-packages/pylint_django/checkers/migrations.py", line 54, in NewDbFieldWithDefaultChecker
__implements__ = (interfaces.IAstroidChecker,)
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pylint.interfaces' has no attribute 'IAstroidChecker' Seems to be related to
Maybe related to the following breaking change in pylint
|
@simensol tnx for the feedback. Somehow I missed this (we are not using django migrations). Prepared another PR. |
I'm still getting this error on 2.6.1 |
When trying to test upgrade pylint to 3.0 that will be released in couple of days.
NOTES: make sure you have the latest version of 3rd party packages
like
rest_framework
,factory
,model_utils
, etc. before reportingissues!
The text was updated successfully, but these errors were encountered: