-
Notifications
You must be signed in to change notification settings - Fork 174
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
[BUG] Not working with the last version of Pylint #465
Comments
I have this same error and output using Python 3.9.9 with pip 21.3.1, installed only with prospector, black, pipenv, and all their respective dependencies. I use prospector with integration with vscode, so I am providing below a detailed error-message json, if it helps. [{
"owner": "python",
"code": "failure",
"severity": 8,
"message": "Tool pylint failed to run (exception was raised, re-run prospector with -X to see the stacktrace)",
"source": "prospector - pylint",
"startLineNumber": 1,
"startColumn": 1,
"endLineNumber": 1,
"endColumn": 1
}] below is my variation of this error: % prospector -X
Traceback (most recent call last):
File "/usr/local/bin/prospector", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/prospector/run.py", line 183, in main
prospector.execute()
File "/usr/local/lib/python3.9/site-packages/prospector/run.py", line 69, in execute
messages += tool.run(found_files)
File "/usr/local/lib/python3.9/site-packages/prospector/tools/pylint/__init__.py", line 259, in run
self._linter.check(self._args)
File "/usr/local/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 996, in check
self._check_files(
File "/usr/local/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 1031, in _check_files
with self._astroid_module_checker() as check_astroid_module:
File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 119, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 1150, in _astroid_module_checker
checker.open()
File "/usr/local/lib/python3.9/site-packages/pylint/checkers/typecheck.py", line 918, in open
self._py310_plus = py_version >= (3, 10)
TypeError: '>=' not supported between instances of 'NoneType' and 'tuple' and the freeze:
|
pip install 'pylint<2.12.0' |
What about releasing bugfix version of prospector with frozen |
Working on it :) I'll make a bugfix first, then make a proper release later to fix compatibility. |
…ecause this is not compatible with prospector (yet)
(Note to self : this was also reported in |
CC @Pierre-Sassoulas you've self-assigned this - do you want to work on the compatibility fix? I just made the bugfix release so far to fix people's CI pipelines (hopefully). I'm happy to do it instead if you don't want to, but I don't want to step on your toes! |
Thank you for doing the hot fix ! :)
I assigned it to me because it looked like a missing call to super() in a class prospector inherit and as I know pylint I could probably fix it without too much effort. And I did not expect you to show up 😉 But I did not have the time to work on it yet. This is a busy week, MR for pylint 2.13 are piling up. I'm relieved to see you stepped up honestly 😄 |
…configuring itself properly. The original code to do this was written 8 years ago, so only really is relevant for very old versions of pylint that are no longer supported anyway
@Pierre-Sassoulas This appears to fix it- 380972f For context that I've tested it locally, it seems to work fine now with latest pylint so I just removed this legacy code. Have a quick look in case there's anything you think I'm missing, but it seems that the problem was that pylint now gathers information about the environment it runs in that prospector was then resetting, leaving pylint to break later. I'll create a dev0 release for this and let people test it before making it a real release. |
I forgot to comment this after I posted my last comment, but I have some results. I changed my interpreter to python 3.10.0 with the same packages installed as above to experiment, and it worked just fine. I didn't get the same error and it showed the linting warnings for my code as it should. Sorry if I'm just stating the obvious, just wanted to post this so everyone knows that prospector works with python 3.10 |
…configuring itself properly. The original code to do this was written 8 years ago, so only really is relevant for very old versions of pylint that are no longer supported anyway
…configuring itself properly. The original code to do this was written 8 years ago, so only really is relevant for very old versions of pylint that are no longer supported anyway
Prospector version |
@carlio Just tested and that looks good, Thanks :-) |
Closing, as 1.5.3 is now a full release which appears to fix this issue. |
@carlio 1.5.3 does not fix this issue. we are still pinning < 2.12, not <= 2.12 |
…in which was in place until prospector was compatible with pylint>=2.12 - I forgot to do this during the 1.5.3 release so... here we go
Done (properly!) in |
Describe the bug
Just not working with the last version of PyLint
To Reproduce
Steps to reproduce the behavior:
prospector -X
in an empty folder=>
Expected behavior
No output, no error
Screenshots
not applicable
Environment (please complete the following information):
Additional context
python3.8 -m pip freeze:
The text was updated successfully, but these errors were encountered: