-
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
[PKG SUPPORT] pylint <3
and Python 3.12
#641
Comments
Hi there, thank you for the report, I will add it to my TODO list along with pylint-dev/pylint-django#405 |
Good man, Carl! Cheers 🍺 |
Is there anything I can do to help resolve this? I'm still running into the issue originally noted in #651. |
#658 seems like a reasonable workaround to get 3.12 support out the door, but I'm also not an expert in prospector or pyroma. Assuming there are other pyroma tests in the suite, there should be some confidence that it doesn't actually break prospector's integration with pyroma. |
@ryancausey cheers, mate! That's what my take is too - also, one clue is that workaround in #658 is needed only for when tests run on Github Actions, local tests run fine without it - beats me what changes in the file that the test runs on GA, but I suspect that's just a minor change like a trailing white space or some newline char, that gets picked up by the |
@Pierre-Sassoulas was my review above of any use? |
Anything more I can do to help move this along? |
Sorry that I have been absent for a while, I will try to get onto this in the next few days... |
very happy to see you back @carlio - we was getting concerned 🍺 |
hey @carlio, any status update on this? |
@carlio anything I can do to help move this along? |
CI image now supports Python 3.12, which revealed an incompatibility with Prospector. prospector-dev/prospector#641 Change-Id: I3d434bc46ad8e30a4a7c3cbec153b43405dbbcc7
Sorry to ask again, but @carlio is there anything I can do to help resolve this? Prospector is currently the only dependency blocking me from moving a lot of projects to Python 3.12. |
I am in the same boat. Any updates on this? |
Hey @Pierre-Sassoulas , is this something that can be picked up by another contributor in @carlio 's absence? Or is there any perspective/ETA on this? Should the community start looking for alternatives? Thanks |
As far as I remember the blocker is a review for #658 where I don't have enough knowledge in prospector to decide if this is the right way to fix the pipeline or not. After that a lot of pipeline will be able to be rebased and merged/upgraded once the pipeline is green. |
The new blocker for pylint 3.0+ is requirements detector that is incompatible with it because it requires astroid between 2 and 3 and pylint requires astroid 3+. This MR needs to be merged and released: prospector-dev/requirements-detector#49, and I can't do it |
@Pierre-Sassoulas Thanks for the release, it makes Prospector compatible with Python 3.12 |
Thank you for giving it your best to get this moving along! Went and done some testing at my end this morning, now on python 3.12 and prospector on 1.11.0 without being fully successful. A full on error on astroid, but i suppose that is related to your statements around astroid, as well as false positives relating to native django. In the case of those files, they are not even explicitly importing those files. But i guess that may also have been dealt with in pylint 3. I guess now we wait again.
|
Hey @robertalexa do you mind showing the content of |
See below traceback. I have omitted the code completely, but if this becomes mandatory i will do my best to provide a non-sensitive version of it. Thanks for the effort you are putting in to support us with this transition! pylint crashed with a
|
Ha ! pip only finds a match for pylint < 3 for python 3.12 (2.17.7) because there's a problem with pylint metadata. We assume astroid is going to be usable with next version of python interpreter because it's often the case, but in this case there's actually a fix to do that is only in pylint 3.0. So we do need #671 to be merged and a new release of prospector to be made. |
@Pierre-Sassoulas I've been keeping an eye on the activity here and I have now tried the new 1.12.0 release, and there still seem to be some issues, at least when running on django
It now fatally crashes straight away, but still related to AstroidChecker. Any thoughts? |
This is due to pylint-django see pylint-dev/pylint-django#432. Carlio gave me permissions to take decisions regarding dropping interpreter in pylint-django so I might fix that next. |
What is your installed version of astroid? If you're using an existing venv, it might not be upgraded just by installing prospector 1.12 as the version constraints allow older astroid ( see #676)On 8 Oct 2024 16:40, Robert Alexa ***@***.***> wrote:
@Pierre-Sassoulas I've been keeping an eye on the activity here and I have now tried the new 1.12.0 release, and there still seem to be some issues, at least when running on django
***@***.***:/opt/REDACTED$ prospector --version
prospector 1.12.0
***@***.***:/opt/REDACTED$ prospector
Traceback (most recent call last):
File "/home/REDACTED/.local/bin/prospector", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/REDACTED/.local/lib/python3.12/site-packages/prospector/run.py", line 198, in main
prospector.execute()
File "/home/REDACTED/.local/lib/python3.12/site-packages/prospector/run.py", line 73, in execute
for tool in self.config.get_tools(found_files):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/REDACTED/.local/lib/python3.12/site-packages/prospector/config/__init__.py", line 68, in get_tools
config_result = tool.configure(self, found_files)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/REDACTED/.local/lib/python3.12/site-packages/prospector/tools/pylint/__init__.py", line 114, in configure
config_messages, configured_by = self._get_pylint_configuration(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/REDACTED/.local/lib/python3.12/site-packages/prospector/tools/pylint/__init__.py", line 173, in _get_pylint_configuration
config_messages = self._prospector_configure(prospector_config, linter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/REDACTED/.local/lib/python3.12/site-packages/prospector/tools/pylint/__init__.py", line 39, in _prospector_configure
linter.load_plugin_modules(["pylint_django"])
File "/home/REDACTED/.local/lib/python3.12/site-packages/pylint/lint/pylinter.py", line 378, in load_plugin_modules
module = astroid.modutils.load_module_from_name(modname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/REDACTED/.local/lib/python3.12/site-packages/astroid/modutils.py", line 182, in load_module_from_name
module = importlib.import_module(dotted_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/home/REDACTED/.local/lib/python3.12/site-packages/pylint_django/__init__.py", line 6, in <module>
from pylint_django import plugin
File "/home/REDACTED/.local/lib/python3.12/site-packages/pylint_django/plugin.py", line 9, in <module>
from pylint_django.checkers import register_checkers
File "/home/REDACTED/.local/lib/python3.12/site-packages/pylint_django/checkers/__init__.py", line 2, in <module>
from pylint_django.checkers.auth_user import AuthUserChecker
File "/home/REDACTED/.local/lib/python3.12/site-packages/pylint_django/checkers/auth_user.py", line 7, in <module>
class AuthUserChecker(checkers.BaseChecker):
File "/home/REDACTED/.local/lib/python3.12/site-packages/pylint_django/checkers/auth_user.py", line 8, in AuthUserChecker
__implements__ = (interfaces.IAstroidChecker,)
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pylint.interfaces' has no attribute 'IAstroidChecker'
It now fatally crashes straight away, but still related to AstroidChecker.
Any thoughts?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I think this is unfixable until pylint-django has a release compatible with python 3.12. pylint-django is incompatible with pylint 3+ / astroid 3+ (still uses the old |
Hey fellas, a quick touching base from one of your conda-feedstock maintainers here - the new v1.10.3 builds well now conda-forge/prospector-feedstock#43 - but I had to pin upper
pylint
to<3
, see failed test withpylint=3
- and since I vaguely understand poetry environment files, I wanted to double checkpylint
is upper pinned to <3 upstream (here) too. Incidentally, Python 3.12 support seems to work fine for you, so I'd suggest you included a Github Action test for 3.12 as well (seen you guys have them all Pythons but no 3.12 GA test yet). Cheers and keep up the good work 🍺The text was updated successfully, but these errors were encountered: