Skip to content

Fatal error in pylint: Issue with dill 0.4.0 on Python 3.13.1 #459

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

Open
uelkerd opened this issue May 16, 2025 · 0 comments
Open

Fatal error in pylint: Issue with dill 0.4.0 on Python 3.13.1 #459

uelkerd opened this issue May 16, 2025 · 0 comments

Comments

@uelkerd
Copy link

uelkerd commented May 16, 2025

Description

When running pylint with the pylint-django plugin enabled, pylint crashes with a fatal error. This appears to be related to compatibility issues between the current version of pylint (3.3.7), dill (0.4.0), and Python 3.13.1.

Environment

  • Python version: 3.13.1
  • pylint version: 3.3.7
  • astroid version: 3.3.10
  • dill version: 0.4.0
  • Operating system: macOS

Steps to Reproduce

  1. Install the dependencies: pip install pylint==3.3.7 pylint-django
  2. Create a .pylintrc file with load-plugins=pylint_django
  3. Run pylint on a Python file
  4. Observe the fatal error

Expected Behavior

pylint should analyze the file without crashing

Actual Behavior

Infinite recursion in wrap_func and ignore_import_warnings_for_related_fields functions leading to:
RecursionError: maximum recursion depth exceeded

Traceback Summary

pylint-crash-2025-05-16-12-38-18.txt
`

Command used

pylint a.py

Pylint output

pylint crashed with a ``AstroidError`` and with the following stacktrace:
Traceback (most recent call last):
  File "~//.vscode/extensions/ms-python.pylint-2025.2.0/bundled/libs/pylint/lint/pylinter.py", line 788, in _lint_file
    check_astroid_module(module)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "~//.vscode/extensions/ms-python.pylint-2025.2.0/bundled/libs/pylint/lint/pylinter.py", line 1020, in check_astroid_module
    retval = self._check_astroid_module(
        ast_node, walker, rawcheckers, tokencheckers
    )
  File "~//.vscode/extensions/ms-python.pylint-2025.2.0/bundled/libs/pylint/lint/pylinter.py", line 1072, in _check_astroid_module
    walker.walk(node)
    ~~~~~~~~~~~^^^^^^
  File "~//.vscode/extensions/ms-python.pylint-2025.2.0/bundled/libs/pylint/utils/ast_walker.py", line 92, in walk
    callback(astroid)
    ~~~~~~~~^^^^^^^^^
  File "~//Projects/aiFeeder_FRESH/00_backend/django-container/.venv/lib/python3.13/site-packages/pylint_django/augmentations/__init__.py", line 766, in wrap_func
    def allow_meta_protected_access(node):
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "~//Projects/aiFeeder_FRESH/00_backend/django-container/.venv/lib/python3.13/site-packages/pylint_django/augmentations/__init__.py", line 339, in ignore_import_warnings_for_related_fields
  File "~//Projects/aiFeeder_FRESH/00_backend/django-container/.venv/lib/python3.13/site-packages/pylint_django/augmentations/__init__.py", line 766, in wrap_func
    def allow_meta_protected_access(node):

<---------- 2000 lines later ----------->


File "~//Projects/aiFeeder_FRESH/00_backend/django-container/.venv/lib/python3.13/site-packages/pylint_django/augmentations/__init__.py", line 339, in ignore_import_warnings_for_related_fields
  File "~//Projects/aiFeeder_FRESH/00_backend/django-container/.venv/lib/python3.13/site-packages/pylint_django/augmentations/__init__.py", line 766, in wrap_func
    def allow_meta_protected_access(node):
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "~//Projects/aiFeeder_FRESH/00_backend/django-container/.venv/lib/python3.13/site-packages/pylint_django/augmentations/__init__.py", line 339, in ignore_import_warnings_for_related_fields
  File "~//Projects/aiFeeder_FRESH/00_backend/django-container/.venv/lib/python3.13/site-packages/pylint_django/augmentations/__init__.py", line 766, in wrap_func
    def allow_meta_protected_access(node):
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "~//Projects/aiFeeder_FRESH/00_backend/django-container/.venv/lib/python3.13/site-packages/pylint_django/augmentations/__init__.py", line 339, in ignore_import_warnings_for_related_fields
  File "~//Projects/aiFeeder_FRESH/00_backend/django-container/.venv/lib/python3.13/site-packages/pylint_django/augmentations/__init__.py", line 766, in wrap_func
    def allow_meta_protected_access(node):
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "~//Projects/aiFeeder_FRESH/00_backend/django-container/.venv/lib/python3.13/site-packages/pylint_django/augmentations/__init__.py", line 339, in ignore_import_warnings_for_related_fields
  File "~//Projects/aiFeeder_FRESH/00_backend/django-container/.venv/lib/python3.13/site-packages/pylint_django/augmentations/__init__.py", line 766, in wrap_func
    def allow_meta_protected_access(node):
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "~//Projects/aiFeeder_FRESH/00_backend/django-container/.venv/lib/python3.13/site-packages/pylint_django/augmentations/__init__.py", line 339, in ignore_import_warnings_for_related_fields
  File "~//Projects/aiFeeder_FRESH/00_backend/django-container/.venv/lib/python3.13/site-packages/pylint_django/augmentations/__init__.py", line 766, in wrap_func
    def allow_meta_protected_access(node):
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "~//Projects/aiFeeder_FRESH/00_backend/django-container/.venv/lib/python3.13/site-packages/pylint_django/augmentations/__init__.py", line 320, in ignore_import_warnings_for_related_fields
    prevent unused-import warnings which are caused by the ForeignKey
             ^^^^^^^^^^^^^^^^^^^
RecursionError: maximum recursion depth exceeded

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "~//.vscode/extensions/ms-python.pylint-2025.2.0/bundled/libs/pylint/lint/pylinter.py", line 752, in _lint_files
    self._lint_file(fileitem, module, check_astroid_module)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~//.vscode/extensions/ms-python.pylint-2025.2.0/bundled/libs/pylint/lint/pylinter.py", line 790, in _lint_file
    raise astroid.AstroidError from e
astroid.exceptions.AstroidError

`

Additional Information

This appears similar to previously reported issues:

Temporary Workaround

I've found that commenting out load-plugins=pylint_django in .pylintrc allows pylint to run without crashing.

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

1 participant