Package pylint-django

Link do Tracker: https://tracker.debian.org/pkg/pylint-django

Link do Salsa (Debian): https://salsa.debian.org/python-team/packages/pylint-django

Link do Salsa (Fork): https://salsa.debian.org/pablolucas890/pylint-django

Link do Debian CI: https://ci.debian.net/packages/p/pylint-django/

Link do lintian do pacote: https://udd.debian.org/lintian/?packages=pylint-django

Link da Merge Request: python-team/packages/pylint-django!2 (merged)

Bugs relacionados:

  • #946619: Re-enable the tests after pylint 2.5 has been released.
  • #978593: Orphan

This is my first packaging, I would be like to update the upstream release of this package, The upstream already published a lot of new releases after the currently release on debian (2.0.13). Looking at the rdepends for this package, it has the prospector:

sid-root@room:/# apt rdepends python3-pylint-django
python3-pylint-django
Reverse Depends:
  Depends: prospector

The package failed on DebianCi tests, I tested it with an debian unstable and it gave the same error:

sid-root@room:/tmp/1/testproject# pylint --version                                                                                                                                  
pylint 3.3.4                                                                                                                                                                        
astroid 3.3.8                                                                                                                                                                       
Python 3.13.2 (main, Feb  5 2025, 01:23:35) [GCC 14.2.0]                                                                                                                            
sid-root@room:/tmp/1/testproject# pylint -E --load-plugins=pylint_django testapp/                                                                                                   
Traceback (most recent call last):
...
ImportError: cannot import name 'check_messages' from 'pylint.checkers.utils' (/usr/lib/python3/dist-packages/pylint/checkers/utils.py)

Looking at the upstream logs, there have apparently been changes to the plugin to support pylint version 3 or higher:

pablo@room /t/3/pylint-django (master)> git log -S "check_messages" --oneline
3b760ed Support for pylint 3.x
pablo@room /t/3/pylint-django (master)> git diff -u 3b760ed > /tmp/3b760ed.patch
pablo@room /t/3/pylint-django (master)> cat /tmp/3b760ed.patch | grep check_messages -A 2 -B 2
     msgs = MESSAGES
 
     @check_messages("model-missing-unicode")
-    def visit_classdef(self, node):
+    def visit_classdef(self, node):  # noqa: PLR0911
--
 
 try:
-    from pylint.checkers.utils import check_messages
-except (ImportError, ModuleNotFoundError):
     from pylint.checkers.utils import only_required_for_messages as check_messages
+except (ImportError, ModuleNotFoundError):
+    from pylint.checkers.utils import check_messages
 
 import pylint

I hope that the new upstream versions fix it.

Edited by Pablo Lucas Silva Santos